perfmonger 0.10.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/.travis.yml +9 -8
  4. data/HOWTO.md +0 -1
  5. data/NEWS +47 -3
  6. data/README.md +77 -27
  7. data/Rakefile +20 -9
  8. data/core/Makefile +10 -18
  9. data/core/build.sh +2 -2
  10. data/core/perfmonger-player.go +90 -40
  11. data/core/perfmonger-plot-formatter.go +18 -4
  12. data/core/perfmonger-recorder.go +22 -2
  13. data/core/perfmonger-summarizer.go +20 -14
  14. data/core/perfmonger-viewer.go +164 -0
  15. data/core/subsystem/Makefile +4 -0
  16. data/core/subsystem/perfmonger_linux.go +95 -0
  17. data/core/subsystem/perfmonger_linux_test.go +40 -0
  18. data/core/subsystem/stat.go +70 -0
  19. data/core/subsystem/stat_test.go +9 -0
  20. data/core/subsystem/usage.go +223 -66
  21. data/core/subsystem/usage_test.go +62 -32
  22. data/{bin → exe}/perfmonger +0 -0
  23. data/lib/perfmonger/command/fingerprint.rb +26 -1
  24. data/lib/perfmonger/command/live.rb +19 -0
  25. data/lib/perfmonger/command/play.rb +16 -0
  26. data/lib/perfmonger/command/plot.rb +25 -9
  27. data/lib/perfmonger/command/record.rb +1 -1
  28. data/lib/perfmonger/command/record_option.rb +16 -0
  29. data/lib/perfmonger/command/server.rb +1 -1
  30. data/lib/perfmonger/version.rb +1 -1
  31. data/misc/werker-box/Dockerfile +34 -0
  32. data/misc/werker-box/build-push.sh +7 -0
  33. data/perfmonger.gemspec +2 -1
  34. data/spec/data/busy100.pgr.played +3 -3
  35. data/spec/fingerprint_spec.rb +1 -1
  36. data/spec/live_spec.rb +2 -3
  37. data/spec/perfmonger_spec.rb +1 -1
  38. data/spec/play_spec.rb +1 -1
  39. data/spec/plot_spec.rb +16 -1
  40. data/spec/record_spec.rb +10 -1
  41. data/spec/spec_helper.rb +28 -3
  42. data/spec/stat_spec.rb +2 -2
  43. data/spec/summary_spec.rb +1 -1
  44. data/wercker.yml +29 -16
  45. metadata +28 -10
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ docker build -t go-rvm .
6
+ docker tag go-rvm hayamiz/go-rvm:wercker-env-0.11.2
7
+ docker push hayamiz/go-rvm:wercker-env-0.11.2
data/perfmonger.gemspec CHANGED
@@ -26,7 +26,8 @@ Gem::Specification.new do |s|
26
26
  end
27
27
  s.files += Dir.glob("lib/exec/*")
28
28
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
29
- s.executables = `git ls-files -- bin/*`.split("\n").map{|f| File.basename(f)}
29
+ s.bindir = "exe"
30
+ s.executables = `git ls-files -- exe/*`.split("\n").map{|f| File.basename(f)}
30
31
 
31
32
  s.post_install_message = <<EOS
32
33
 
@@ -1,3 +1,3 @@
1
- {"time":1425358686.123,"cpu":{"num_core":2,"all":{"usr":100.00,"nice":0.00,"sys":0.67,"idle":99.33,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},"cores":[{"usr":0.33,"nice":0.00,"sys":0.33,"idle":99.33,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},{"usr":99.67,"nice":0.00,"sys":0.33,"idle":0.00,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00}]},"disk":{"devices":["sda","sda1","sda2"],"sda":{"riops":0.00,"wiops":1.67,"rkbyteps":0.00,"wkbyteps":26.66,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":32.00,"qlen":0.00},"sda1":{"riops":0.00,"wiops":1.67,"rkbyteps":0.00,"wkbyteps":26.66,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":32.00,"qlen":0.00},"sda2":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"total":{"riops":0.00,"wiops":3.33,"rkbyteps":0.00,"wkbyteps":53.31,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":32.00,"qlen":0.00}},"net":{"devices":["eth0","lo"],"eth0":{"rxkbyteps":0.04,"rxpktps":0.67,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.24,"txpktps":0.67,"txerrps":0.00,"txdropps":0.00},"lo":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"total":{"rxkbyteps":0.04,"rxpktps":0.67,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.24,"txpktps":0.67,"txerrps":0.00,"txdropps":0.00}}}
2
- {"time":1425358689.123,"cpu":{"num_core":2,"all":{"usr":100.50,"nice":0.00,"sys":0.33,"idle":99.17,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},"cores":[{"usr":0.33,"nice":0.00,"sys":0.33,"idle":99.33,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},{"usr":100.00,"nice":0.00,"sys":0.00,"idle":0.00,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00}]},"disk":{"devices":["sda","sda1","sda2"],"sda":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda1":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda2":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"total":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00}},"net":{"devices":["eth0","lo"],"eth0":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"lo":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"total":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00}}}
3
- {"time":1425358690.645,"cpu":{"num_core":2,"all":{"usr":100.65,"nice":0.00,"sys":0.00,"idle":99.35,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},"cores":[{"usr":0.65,"nice":0.00,"sys":0.65,"idle":98.70,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},{"usr":100.00,"nice":0.00,"sys":0.00,"idle":0.00,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00}]},"disk":{"devices":["sda","sda1","sda2"],"sda":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda1":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda2":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"total":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00}},"net":{"devices":["eth0","lo"],"eth0":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"lo":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"total":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00}}}
1
+ {"time":1425358686.123,"elapsed_time":3.001,"cpu":{"num_core":2,"all":{"usr":100.00,"nice":0.00,"sys":0.67,"idle":99.33,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},"cores":[{"usr":0.33,"nice":0.00,"sys":0.33,"idle":99.33,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},{"usr":99.67,"nice":0.00,"sys":0.33,"idle":0.00,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00}]},"disk":{"devices":["sda","sda1","sda2"],"sda":{"riops":0.00,"wiops":1.67,"rkbyteps":0.00,"wkbyteps":26.66,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":32.00,"qlen":0.00},"sda1":{"riops":0.00,"wiops":1.67,"rkbyteps":0.00,"wkbyteps":26.66,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":32.00,"qlen":0.00},"sda2":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"total":{"riops":0.00,"wiops":3.33,"rkbyteps":0.00,"wkbyteps":53.31,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":32.00,"qlen":0.00}},"net":{"devices":["eth0","lo"],"eth0":{"rxkbyteps":0.04,"rxpktps":0.67,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.24,"txpktps":0.67,"txerrps":0.00,"txdropps":0.00},"lo":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"total":{"rxkbyteps":0.04,"rxpktps":0.67,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.24,"txpktps":0.67,"txerrps":0.00,"txdropps":0.00}}}
2
+ {"time":1425358689.123,"elapsed_time":6.001,"cpu":{"num_core":2,"all":{"usr":100.50,"nice":0.00,"sys":0.33,"idle":99.17,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},"cores":[{"usr":0.33,"nice":0.00,"sys":0.33,"idle":99.33,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},{"usr":100.00,"nice":0.00,"sys":0.00,"idle":0.00,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00}]},"disk":{"devices":["sda","sda1","sda2"],"sda":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda1":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda2":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"total":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00}},"net":{"devices":["eth0","lo"],"eth0":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"lo":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"total":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00}}}
3
+ {"time":1425358690.645,"elapsed_time":7.524,"cpu":{"num_core":2,"all":{"usr":100.65,"nice":0.00,"sys":0.00,"idle":99.35,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},"cores":[{"usr":0.65,"nice":0.00,"sys":0.65,"idle":98.70,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00},{"usr":100.00,"nice":0.00,"sys":0.00,"idle":0.00,"iowait":0.00,"hardirq":0.00,"softirq":0.00,"steal":0.00,"guest":0.00,"guestnice":0.00}]},"disk":{"devices":["sda","sda1","sda2"],"sda":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda1":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"sda2":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00},"total":{"riops":0.00,"wiops":0.00,"rkbyteps":0.00,"wkbyteps":0.00,"rlatency":0.000,"wlatency":0.000,"rsize":0.00,"wsize":0.00,"qlen":0.00}},"net":{"devices":["eth0","lo"],"eth0":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"lo":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00},"total":{"rxkbyteps":0.00,"rxpktps":0.00,"rxerrps":0.00,"rxdropps":0.00,"txkbyteps":0.00,"txpktps":0.00,"txerrps":0.00,"txdropps":0.00}}}
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'tmpdir'
3
3
 
4
- describe '[fingerprint] subcommand' do
4
+ RSpec.describe '[fingerprint] subcommand' do
5
5
  before(:each) do
6
6
  @old_pwd = Dir.pwd
7
7
  @tmpdir = Dir.mktmpdir
data/spec/live_spec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe '[live] subcommand' do
3
+ RSpec.describe '[live] subcommand' do
4
4
  before(:each) do
5
5
  skip_if_proc_is_not_available
6
6
  end
@@ -9,7 +9,6 @@ describe '[live] subcommand' do
9
9
  cmd = "#{perfmonger_bin} live --timeout 3"
10
10
  run(cmd, 5)
11
11
  expect(last_command_started).to be_successfully_executed
12
- expect(last_command_started.stdout.lines.to_a.size).to eq 3
13
12
 
14
13
  run(cmd)
15
14
  last_command_started.stdout.each_line do |line|
@@ -21,6 +20,6 @@ describe '[live] subcommand' do
21
20
  expect(json.keys.sort).to eq %w{time cpu disk net}.sort
22
21
  end
23
22
 
24
- expect("perfmonger.pgr").to be_an_existing_file
23
+ expect("perfmonger.pgr.gz").to be_an_existing_file
25
24
  end
26
25
  end
@@ -1,7 +1,7 @@
1
1
 
2
2
  require 'spec_helper'
3
3
 
4
- describe "perfmonger command" do
4
+ RSpec.describe "perfmonger command" do
5
5
  it "should be an executable" do
6
6
  expect(File.executable?(perfmonger_bin)).to be true
7
7
  end
data/spec/play_spec.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  require 'spec_helper'
3
3
 
4
- describe '[play] subcommand' do
4
+ RSpec.describe '[play] subcommand' do
5
5
  it 'should print 3 JSON records for busy100.pgr' do
6
6
  busy100 = data_file "busy100.pgr"
7
7
  cmd = "#{perfmonger_bin} play #{busy100}"
data/spec/plot_spec.rb CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  # TODO: examples for options
4
4
 
5
- describe '[plot] subcommand' do
5
+ RSpec.describe '[plot] subcommand' do
6
6
  let(:busy100_disk_dat) {
7
7
  File.read(data_file "busy100.pgr.plot-formatted.disk.dat")
8
8
  }
@@ -74,4 +74,19 @@ describe '[plot] subcommand' do
74
74
  expect("disk.dat").to have_file_content busy100_disk_dat
75
75
  expect("cpu.dat").to have_file_content busy100_cpu_dat
76
76
  end
77
+
78
+ it "should work with --disk-only option" do
79
+ busy100 = data_file "busy100.pgr.gz"
80
+
81
+ cmd = "#{perfmonger_bin} plot --save #{busy100} --disk-only sda1"
82
+
83
+ run(cmd, 30)
84
+
85
+ expect(last_command_started).to be_successfully_executed
86
+
87
+ disk_dat = File.expand_path("disk.dat", last_command_started.working_directory)
88
+ total_write_iops = `cat #{disk_dat}|grep total -A 2|tail -n1|awk '{print $3}'`.to_f
89
+
90
+ expect(total_write_iops).to be_within(1.67).of(0.01)
91
+ end
77
92
  end
data/spec/record_spec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe '[record] subcommand' do
3
+ RSpec.describe '[record] subcommand' do
4
4
  before(:each) do
5
5
  skip_if_proc_is_not_available
6
6
  end
@@ -9,7 +9,16 @@ describe '[record] subcommand' do
9
9
  cmd = "#{perfmonger_bin} record --timeout 1"
10
10
  run(cmd)
11
11
  expect(last_command_started).to be_successfully_executed
12
+ expect("perfmonger.pgr.gz").to be_an_existing_file # default file name
13
+ expect(last_command_started.stdout).to be_empty
14
+ end
15
+
16
+ it 'should create a non-gzipped logfile' do
17
+ cmd = "#{perfmonger_bin} record --timeout 1 --no-gzip"
18
+ run(cmd)
19
+ expect(last_command_started).to be_successfully_executed
12
20
  expect("perfmonger.pgr").to be_an_existing_file # default file name
13
21
  expect(last_command_started.stdout).to be_empty
14
22
  end
23
+
15
24
  end
data/spec/spec_helper.rb CHANGED
@@ -19,15 +19,40 @@ def data_file(rel_path)
19
19
  end
20
20
 
21
21
  def perfmonger_bin
22
- File.expand_path('../../bin/perfmonger', __FILE__)
22
+ File.expand_path('../../exe/perfmonger', __FILE__)
23
23
  end
24
24
 
25
25
  RSpec.configure do |config|
26
- # RSpec config here
26
+ config.expect_with :rspec do |expectations|
27
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
28
+ end
29
+
30
+ config.mock_with :rspec do |mocks|
31
+ mocks.verify_partial_doubles = true
32
+ end
33
+
34
+ config.shared_context_metadata_behavior = :apply_to_host_groups
35
+
36
+ config.filter_run_when_matching :focus
37
+
38
+ config.example_status_persistence_file_path = "spec/examples.txt"
39
+
40
+ config.disable_monkey_patching!
41
+
42
+ config.warnings = true
43
+
44
+ if config.files_to_run.one?
45
+ config.default_formatter = "doc"
46
+ end
47
+
48
+ config.profile_examples = 10
49
+
50
+ config.order = :random
51
+ # Kernel.srand config.seed
27
52
  end
28
53
 
29
54
  def skip_if_proc_is_not_available
30
- if ! File.exists?("/proc/diskstats")
55
+ if ! File.exist?("/proc/diskstats")
31
56
  skip "/proc/diskstats is not available."
32
57
  end
33
58
  end
data/spec/stat_spec.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  require 'spec_helper'
3
3
 
4
- describe '[stat] subcommand' do
4
+ RSpec.describe '[stat] subcommand' do
5
5
  before(:each) do
6
6
  skip_if_proc_is_not_available
7
7
  end
@@ -10,6 +10,6 @@ describe '[stat] subcommand' do
10
10
  cmd = "#{perfmonger_bin} stat -- sleep 1"
11
11
  run(cmd)
12
12
  expect(last_command_started).to be_successfully_executed
13
- expect("perfmonger.pgr").to be_an_existing_file
13
+ expect("perfmonger.pgr.gz").to be_an_existing_file
14
14
  end
15
15
  end
data/spec/summary_spec.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  require 'spec_helper'
3
3
 
4
- describe '[summary] subcommand' do
4
+ RSpec.describe '[summary] subcommand' do
5
5
  let(:busy100_summary) do
6
6
  content = File.read(data_file "busy100.pgr.summary")
7
7
 
data/wercker.yml CHANGED
@@ -1,4 +1,4 @@
1
- box: hayamiz/rvm-golang
1
+ box: hayamiz/go-rvm:wercker-env-0.11.2
2
2
  # Build definition
3
3
  build:
4
4
  # The steps that will be executed on build
@@ -6,19 +6,17 @@ build:
6
6
  # http://devcenter.wercker.com/articles/languages/ruby.html
7
7
  steps:
8
8
  - script:
9
- name: install gnuplot and check terminal
9
+ name: prepare perfmonger go subsystem
10
10
  code: |
11
- sudo apt-get update
12
- sudo apt-get install gnuplot
13
- gnuplot -e "set terminal" < /dev/null 2>&1
11
+ source /etc/profile.d/rvm.sh
12
+ rvm use 2.4.9
13
+ rake go_get
14
14
 
15
15
  - script:
16
- name: install go packages
16
+ name: switch ruby to 2.4.9
17
17
  code: |
18
- go get -u golang.org/x/crypto/ssh/terminal
19
- go get -u github.com/hayamiz/perfmonger/core/subsystem
20
- - rvm-use:
21
- version: 1.9.3-p551
18
+ source /etc/profile.d/rvm.sh
19
+ rvm use 2.4.9
22
20
  - bundle-install
23
21
  - script:
24
22
  name: run rspec
@@ -26,8 +24,11 @@ build:
26
24
  bundle exec rake clean
27
25
  bundle exec rake spec
28
26
 
29
- - rvm-use:
30
- version: 2.0.0-p598
27
+ - script:
28
+ name: switch ruby to 2.5.7
29
+ code: |
30
+ source /etc/profile.d/rvm.sh
31
+ rvm use 2.5.7
31
32
  - bundle-install
32
33
  - script:
33
34
  name: run rspec
@@ -35,8 +36,11 @@ build:
35
36
  bundle exec rake clean
36
37
  bundle exec rake spec
37
38
 
38
- - rvm-use:
39
- version: 2.1.5
39
+ - script:
40
+ name: switch ruby to 2.6.5
41
+ code: |
42
+ source /etc/profile.d/rvm.sh
43
+ rvm use 2.6.5
40
44
  - bundle-install
41
45
  - script:
42
46
  name: run rspec
@@ -44,8 +48,11 @@ build:
44
48
  bundle exec rake clean
45
49
  bundle exec rake spec
46
50
 
47
- - rvm-use:
48
- version: 2.2.0
51
+ - script:
52
+ name: switch ruby to 2.7.0
53
+ code: |
54
+ source /etc/profile.d/rvm.sh
55
+ rvm use 2.7.0
49
56
  - bundle-install
50
57
  - script:
51
58
  name: run rspec
@@ -57,3 +64,9 @@ build:
57
64
  name: run go test
58
65
  code: |
59
66
  bundle exec rake test_core
67
+ after-steps:
68
+ - slack-notifier:
69
+ url: $SLACK_URL
70
+ channel: pokeme
71
+ username: werckerbot
72
+ notify_on: "failed"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfmonger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuto HAYAMIZU
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -99,13 +99,13 @@ files:
99
99
  - NEWS
100
100
  - README.md
101
101
  - Rakefile
102
- - bin/perfmonger
103
102
  - core/Makefile
104
103
  - core/build.sh
105
104
  - core/perfmonger-player.go
106
105
  - core/perfmonger-plot-formatter.go
107
106
  - core/perfmonger-recorder.go
108
107
  - core/perfmonger-summarizer.go
108
+ - core/perfmonger-viewer.go
109
109
  - core/subsystem/Makefile
110
110
  - core/subsystem/perfmonger.go
111
111
  - core/subsystem/perfmonger_darwin.go
@@ -129,18 +129,17 @@ files:
129
129
  - data/assets/js/canvasjs.js
130
130
  - data/assets/js/canvasjs.min.js
131
131
  - data/sysstat.ioconf
132
+ - exe/perfmonger
132
133
  - lib/exec/perfmonger-player_darwin_amd64
133
- - lib/exec/perfmonger-player_linux_386
134
134
  - lib/exec/perfmonger-player_linux_amd64
135
135
  - lib/exec/perfmonger-plot-formatter_darwin_amd64
136
- - lib/exec/perfmonger-plot-formatter_linux_386
137
136
  - lib/exec/perfmonger-plot-formatter_linux_amd64
138
137
  - lib/exec/perfmonger-recorder_darwin_amd64
139
- - lib/exec/perfmonger-recorder_linux_386
140
138
  - lib/exec/perfmonger-recorder_linux_amd64
141
139
  - lib/exec/perfmonger-summarizer_darwin_amd64
142
- - lib/exec/perfmonger-summarizer_linux_386
143
140
  - lib/exec/perfmonger-summarizer_linux_amd64
141
+ - lib/exec/perfmonger-viewer_darwin_amd64
142
+ - lib/exec/perfmonger-viewer_linux_amd64
144
143
  - lib/perfmonger.rb
145
144
  - lib/perfmonger/cli.rb
146
145
  - lib/perfmonger/command/base_command.rb
@@ -163,6 +162,8 @@ files:
163
162
  - misc/release-howto.txt
164
163
  - misc/sample-cpu.png
165
164
  - misc/sample-read-iops.png
165
+ - misc/werker-box/Dockerfile
166
+ - misc/werker-box/build-push.sh
166
167
  - perfmonger.gemspec
167
168
  - spec/data/busy100.pgr
168
169
  - spec/data/busy100.pgr.gz
@@ -214,8 +215,25 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
215
  version: '0'
215
216
  requirements: []
216
217
  rubyforge_project:
217
- rubygems_version: 2.5.1
218
+ rubygems_version: 2.7.6
218
219
  signing_key:
219
220
  specification_version: 4
220
221
  summary: yet anothor performance measurement/monitoring tool
221
- test_files: []
222
+ test_files:
223
+ - spec/data/busy100.pgr
224
+ - spec/data/busy100.pgr.gz
225
+ - spec/data/busy100.pgr.played
226
+ - spec/data/busy100.pgr.plot-formatted.cpu.dat
227
+ - spec/data/busy100.pgr.plot-formatted.disk.dat
228
+ - spec/data/busy100.pgr.summary
229
+ - spec/data/busy100.pgr.summary.json
230
+ - spec/fingerprint_spec.rb
231
+ - spec/live_spec.rb
232
+ - spec/perfmonger_spec.rb
233
+ - spec/play_spec.rb
234
+ - spec/plot_spec.rb
235
+ - spec/record_spec.rb
236
+ - spec/spec_helper.rb
237
+ - spec/stat_spec.rb
238
+ - spec/summary_spec.rb
239
+ - spec/support/aruba.rb