perfmonger 0.6.1 → 0.7.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 (87) hide show
  1. checksums.yaml +5 -13
  2. data/.gitignore +6 -0
  3. data/.tachikoma.yml +1 -0
  4. data/.travis.yml +18 -6
  5. data/Gemfile +1 -3
  6. data/Guardfile +26 -0
  7. data/NEWS +21 -0
  8. data/README.md +8 -9
  9. data/Rakefile +33 -1
  10. data/core/Makefile +23 -0
  11. data/core/build.sh +48 -0
  12. data/core/perfmonger-player.go +165 -0
  13. data/core/perfmonger-recorder.go +296 -0
  14. data/core/perfmonger-summarizer.go +207 -0
  15. data/core/subsystem/Makefile +3 -0
  16. data/core/subsystem/perfmonger.go +60 -0
  17. data/core/subsystem/perfmonger_darwin.go +22 -0
  18. data/core/subsystem/perfmonger_linux.go +292 -0
  19. data/core/subsystem/perfmonger_linux_test.go +73 -0
  20. data/core/subsystem/stat.go +214 -0
  21. data/core/subsystem/stat_test.go +281 -0
  22. data/core/subsystem/usage.go +410 -0
  23. data/core/subsystem/usage_test.go +496 -0
  24. data/lib/exec/operationBinding.rb.svn-base +59 -0
  25. data/lib/exec/perfmonger-player_darwin_amd64 +0 -0
  26. data/lib/exec/perfmonger-player_linux_386 +0 -0
  27. data/lib/exec/perfmonger-player_linux_amd64 +0 -0
  28. data/lib/exec/perfmonger-recorder_darwin_amd64 +0 -0
  29. data/lib/exec/perfmonger-recorder_linux_386 +0 -0
  30. data/lib/exec/perfmonger-recorder_linux_amd64 +0 -0
  31. data/lib/exec/perfmonger-summarizer_darwin_amd64 +0 -0
  32. data/lib/exec/perfmonger-summarizer_linux_386 +0 -0
  33. data/lib/exec/perfmonger-summarizer_linux_amd64 +0 -0
  34. data/lib/exec/perfmonger-summary_linux_386 +0 -0
  35. data/lib/exec/perfmonger-summary_linux_amd64 +0 -0
  36. data/lib/perfmonger/cli.rb +8 -3
  37. data/lib/perfmonger/command/core.rb +62 -0
  38. data/lib/perfmonger/command/live.rb +39 -0
  39. data/lib/perfmonger/command/play.rb +56 -0
  40. data/lib/perfmonger/command/plot.rb +30 -22
  41. data/lib/perfmonger/command/record.rb +3 -2
  42. data/lib/perfmonger/command/record_option.rb +40 -59
  43. data/lib/perfmonger/command/server.rb +7 -2
  44. data/lib/perfmonger/command/stat.rb +2 -2
  45. data/lib/perfmonger/command/stat_option.rb +1 -1
  46. data/lib/perfmonger/command/summary.rb +11 -326
  47. data/lib/perfmonger/version.rb +1 -3
  48. data/lib/perfmonger.rb +3 -0
  49. data/misc/_perfmonger +128 -0
  50. data/misc/perfmonger-completion.bash +49 -0
  51. data/perfmonger.gemspec +6 -5
  52. data/spec/data/busy100.pgr +0 -0
  53. data/spec/fingerprint_spec.rb +35 -0
  54. data/spec/live_spec.rb +25 -0
  55. data/spec/perfmonger_spec.rb +37 -0
  56. data/spec/play_spec.rb +21 -0
  57. data/spec/plot_spec.rb +42 -0
  58. data/spec/record_spec.rb +15 -0
  59. data/spec/spec_helper.rb +33 -0
  60. data/spec/stat_spec.rb +15 -0
  61. data/spec/summary_spec.rb +51 -0
  62. data/spec/support/aruba.rb +11 -0
  63. data/wercker.yml +59 -0
  64. metadata +117 -45
  65. data/ext/perfmonger/extconf.rb +0 -19
  66. data/ext/perfmonger/perfmonger.h +0 -58
  67. data/ext/perfmonger/perfmonger_record.c +0 -754
  68. data/ext/perfmonger/sysstat/common.c +0 -627
  69. data/ext/perfmonger/sysstat/common.h +0 -207
  70. data/ext/perfmonger/sysstat/ioconf.c +0 -515
  71. data/ext/perfmonger/sysstat/ioconf.h +0 -84
  72. data/ext/perfmonger/sysstat/iostat.c +0 -1100
  73. data/ext/perfmonger/sysstat/iostat.h +0 -121
  74. data/ext/perfmonger/sysstat/libsysstat.h +0 -19
  75. data/ext/perfmonger/sysstat/mpstat.c +0 -953
  76. data/ext/perfmonger/sysstat/mpstat.h +0 -79
  77. data/ext/perfmonger/sysstat/rd_stats.c +0 -2388
  78. data/ext/perfmonger/sysstat/rd_stats.h +0 -651
  79. data/ext/perfmonger/sysstat/sysconfig.h +0 -13
  80. data/test/run-test.sh +0 -39
  81. data/test/spec/bin_spec.rb +0 -37
  82. data/test/spec/data/2devices.expected +0 -42
  83. data/test/spec/data/2devices.output +0 -42
  84. data/test/spec/spec_helper.rb +0 -20
  85. data/test/spec/summary_spec.rb +0 -193
  86. data/test/test-perfmonger.c +0 -145
  87. data/test/test.h +0 -9
data/spec/play_spec.rb ADDED
@@ -0,0 +1,21 @@
1
+
2
+ require 'spec_helper'
3
+
4
+ describe '[play] subcommand' do
5
+ it 'should print 3 JSON records for busy100.pgr' do
6
+ busy100 = data_file "busy100.pgr"
7
+ cmd = "#{perfmonger_bin} play #{busy100}"
8
+ run(cmd)
9
+ assert_success(true)
10
+ expect(stdout_from(cmd).lines.to_a.size).to eq 3
11
+
12
+ stdout_from(cmd).each_line do |line|
13
+ expect do
14
+ JSON.parse(line)
15
+ end.not_to raise_error
16
+
17
+ json = JSON.parse(line)
18
+ expect(json.keys.sort).to eq %w{time cpu disk net}.sort
19
+ end
20
+ end
21
+ end
data/spec/plot_spec.rb ADDED
@@ -0,0 +1,42 @@
1
+ require 'spec_helper'
2
+
3
+ # TODO: examples for options
4
+
5
+ describe '[plot] subcommand' do
6
+ before(:each) do
7
+ if ! system("type gnuplot >/dev/null 2>&1")
8
+ skip "gnuplot is not available"
9
+ end
10
+ end
11
+
12
+ it 'should create PDFs for busy100.pgr' do
13
+ busy100 = data_file "busy100.pgr"
14
+
15
+ cmd = "#{perfmonger_bin} plot #{busy100}"
16
+ run(cmd, 30)
17
+ assert_success(true)
18
+ check_file_presence("iops.pdf")
19
+ check_file_presence("transfer.pdf")
20
+ check_file_presence("cpu.pdf")
21
+ check_file_presence("allcpu.pdf")
22
+ end
23
+
24
+ it 'should create PDFs, data and gnuplot files when --save is given' do
25
+ busy100 = data_file "busy100.pgr"
26
+
27
+ cmd = "#{perfmonger_bin} plot --save #{busy100}"
28
+ run(cmd, 30)
29
+ assert_success(true)
30
+ check_file_presence("iops.pdf")
31
+ check_file_presence("transfer.pdf")
32
+ check_file_presence("cpu.pdf")
33
+ check_file_presence("allcpu.pdf")
34
+
35
+ check_file_presence("io.gp")
36
+ check_file_presence("io.dat")
37
+ check_file_presence("cpu.gp")
38
+ check_file_presence("cpu.dat")
39
+ check_file_presence("allcpu.gp")
40
+ check_file_presence("allcpu.dat")
41
+ end
42
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe '[record] subcommand' do
4
+ before(:each) do
5
+ skip_if_proc_is_not_available
6
+ end
7
+
8
+ it 'should create a valid logfile with no output to stdout' do
9
+ cmd = "#{perfmonger_bin} record --timeout 1"
10
+ run(cmd)
11
+ assert_success(true)
12
+ check_file_presence("perfmonger.pgr") # default file name
13
+ expect(stdout_from(cmd)).to be_empty
14
+ end
15
+ end
@@ -0,0 +1,33 @@
1
+ $LOAD_PATH << File.expand_path('../../lib', __FILE__)
2
+
3
+ if ENV['RUBYLIB']
4
+ ENV['RUBYLIB'] += ":"
5
+ else
6
+ ENV['RUBYLIB'] = ""
7
+ end
8
+ ENV['RUBYLIB'] += File.expand_path('../../lib', __FILE__)
9
+
10
+ TEST_DATA_DIR = File.expand_path('../data', __FILE__)
11
+
12
+ require 'perfmonger'
13
+ require 'tempfile'
14
+ require 'pathname'
15
+ Dir.glob(::File.expand_path('../support/*.rb', __FILE__)).each { |f| require_relative f }
16
+
17
+ def data_file(rel_path)
18
+ File.expand_path(rel_path, TEST_DATA_DIR)
19
+ end
20
+
21
+ def perfmonger_bin
22
+ File.expand_path('../../bin/perfmonger', __FILE__)
23
+ end
24
+
25
+ RSpec.configure do |config|
26
+ # RSpec config here
27
+ end
28
+
29
+ def skip_if_proc_is_not_available
30
+ if ! File.exists?("/proc/diskstats")
31
+ skip "/proc/diskstats is not available."
32
+ end
33
+ end
data/spec/stat_spec.rb ADDED
@@ -0,0 +1,15 @@
1
+
2
+ require 'spec_helper'
3
+
4
+ describe '[stat] subcommand' do
5
+ before(:each) do
6
+ skip_if_proc_is_not_available
7
+ end
8
+
9
+ it 'should print "Execution time: XXX.XXX"' do
10
+ cmd = "#{perfmonger_bin} stat -- sleep 1"
11
+ run(cmd)
12
+ assert_success(true)
13
+ check_file_presence("perfmonger.pgr")
14
+ end
15
+ end
@@ -0,0 +1,51 @@
1
+
2
+ require 'spec_helper'
3
+
4
+ describe '[summary] subcommand' do
5
+ it 'should print valid output' do
6
+ busy100 = data_file "busy100.pgr"
7
+ cmd = "#{perfmonger_bin} summary #{busy100}"
8
+ run(cmd)
9
+ assert_success(true)
10
+ output = stdout_from(cmd)
11
+
12
+ # measurement duration
13
+ expect(output).to match(/^Duration: (\d+\.\d+) sec$/)
14
+
15
+ # CPU usage
16
+ non_idle_regex = /Non-idle usage: (\d+\.\d+) %$/
17
+ usr_regex = /%usr: (\d+\.\d+) %$/
18
+ idle_regex = /Idle usage: (\d+\.\d+) %$/
19
+ expect(output).to match(non_idle_regex)
20
+ expect(output).to match(usr_regex)
21
+ expect(output).to match(idle_regex)
22
+
23
+ non_idle_regex =~ output; non_idle_usage = Float($~[1])
24
+ idle_regex =~ output; idle_usage = Float($~[1])
25
+ usr_regex =~ output; usr_usage = Float($~[1])
26
+
27
+ expect(non_idle_usage).to be_within(1.0).of(100.0)
28
+ expect(usr_usage).to be_within(1.0).of(100.0)
29
+ expect(idle_usage).to be_within(1.0).of(99.0)
30
+ expect(non_idle_usage + idle_usage).to be_within(0.1).of(200.0)
31
+
32
+ # disk usage
33
+ expect(output).to match(/^\* Average DEVICE usage: .+$/)
34
+ end
35
+
36
+ it 'should print valid JSON if --json option is given' do
37
+ busy100 = data_file "busy100.pgr"
38
+ cmd = "#{perfmonger_bin} summary --json #{busy100}"
39
+ run(cmd)
40
+ assert_success(true)
41
+ output = stdout_from(cmd)
42
+
43
+ expect do
44
+ JSON.parse(output)
45
+ end.not_to raise_error
46
+
47
+ json = JSON.parse(output)
48
+
49
+ expect(json.keys.sort).to eq %w{cpu disk net exectime}.sort
50
+ end
51
+ end
@@ -0,0 +1,11 @@
1
+ require 'aruba/api'
2
+ require 'aruba/reporting'
3
+
4
+ RSpec.configure do |config|
5
+ config.include Aruba::Api
6
+
7
+ config.before(:each) do
8
+ restore_env
9
+ clean_current_dir
10
+ end
11
+ end
data/wercker.yml ADDED
@@ -0,0 +1,59 @@
1
+ box: hayamiz/rvm-golang
2
+ # Build definition
3
+ build:
4
+ # The steps that will be executed on build
5
+ # See the Ruby section on the wercker devcenter:
6
+ # http://devcenter.wercker.com/articles/languages/ruby.html
7
+ steps:
8
+ - script:
9
+ name: install gnuplot and check terminal
10
+ code: |
11
+ sudo apt-get update
12
+ sudo apt-get install gnuplot
13
+ gnuplot -e "set terminal" < /dev/null 2>&1
14
+
15
+ - script:
16
+ name: install go packages
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
22
+ - bundle-install
23
+ - script:
24
+ name: run rspec
25
+ code: |
26
+ bundle exec rake clean
27
+ bundle exec rake spec
28
+
29
+ - rvm-use:
30
+ version: 2.0.0-p598
31
+ - bundle-install
32
+ - script:
33
+ name: run rspec
34
+ code: |
35
+ bundle exec rake clean
36
+ bundle exec rake spec
37
+
38
+ - rvm-use:
39
+ version: 2.1.5
40
+ - bundle-install
41
+ - script:
42
+ name: run rspec
43
+ code: |
44
+ bundle exec rake clean
45
+ bundle exec rake spec
46
+
47
+ - rvm-use:
48
+ version: 2.2.0
49
+ - bundle-install
50
+ - script:
51
+ name: run rspec
52
+ code: |
53
+ bundle exec rake clean
54
+ bundle exec rake spec
55
+
56
+ - script:
57
+ name: run go test
58
+ code: |
59
+ bundle exec rake test_core
metadata CHANGED
@@ -1,76 +1,133 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfmonger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuto HAYAMIZU
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-19 00:00:00.000000000 Z
11
+ date: 2015-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rake
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - ! '>='
31
+ - - ">="
18
32
  - !ruby/object:Gem::Version
19
33
  version: '0'
20
34
  type: :development
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - ! '>='
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
40
  version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - ! '>='
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
47
  version: '0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - ! '>='
52
+ - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake-compiler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ! '>='
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: aruba
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
46
88
  - !ruby/object:Gem::Version
47
89
  version: '0'
48
90
  type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
- - - ! '>='
94
+ - - ">="
53
95
  - !ruby/object:Gem::Version
54
96
  version: '0'
55
97
  description: yet anothor performance measurement/monitoring tool
56
98
  email: y.hayamizu@gmail.com
57
99
  executables:
58
100
  - perfmonger
59
- extensions:
60
- - ext/perfmonger/extconf.rb
101
+ extensions: []
61
102
  extra_rdoc_files: []
62
103
  files:
63
- - .dir-locals.el
64
- - .gitignore
65
- - .rspec
66
- - .travis.yml
104
+ - ".dir-locals.el"
105
+ - ".gitignore"
106
+ - ".rspec"
107
+ - ".tachikoma.yml"
108
+ - ".travis.yml"
67
109
  - COPYING
68
110
  - Gemfile
111
+ - Guardfile
69
112
  - HOWTO.md
70
113
  - NEWS
71
114
  - README.md
72
115
  - Rakefile
73
116
  - bin/perfmonger
117
+ - core/Makefile
118
+ - core/build.sh
119
+ - core/perfmonger-player.go
120
+ - core/perfmonger-recorder.go
121
+ - core/perfmonger-summarizer.go
122
+ - core/subsystem/Makefile
123
+ - core/subsystem/perfmonger.go
124
+ - core/subsystem/perfmonger_darwin.go
125
+ - core/subsystem/perfmonger_linux.go
126
+ - core/subsystem/perfmonger_linux_test.go
127
+ - core/subsystem/stat.go
128
+ - core/subsystem/stat_test.go
129
+ - core/subsystem/usage.go
130
+ - core/subsystem/usage_test.go
74
131
  - data/NOTICE
75
132
  - data/Twitter_Bootstrap_LICENSE.txt
76
133
  - data/assets/css/bootstrap-responsive.css
@@ -84,25 +141,25 @@ files:
84
141
  - data/assets/js/canvasjs.js
85
142
  - data/assets/js/canvasjs.min.js
86
143
  - data/sysstat.ioconf
87
- - ext/perfmonger/extconf.rb
88
- - ext/perfmonger/perfmonger.h
89
- - ext/perfmonger/perfmonger_record.c
90
- - ext/perfmonger/sysstat/common.c
91
- - ext/perfmonger/sysstat/common.h
92
- - ext/perfmonger/sysstat/ioconf.c
93
- - ext/perfmonger/sysstat/ioconf.h
94
- - ext/perfmonger/sysstat/iostat.c
95
- - ext/perfmonger/sysstat/iostat.h
96
- - ext/perfmonger/sysstat/libsysstat.h
97
- - ext/perfmonger/sysstat/mpstat.c
98
- - ext/perfmonger/sysstat/mpstat.h
99
- - ext/perfmonger/sysstat/rd_stats.c
100
- - ext/perfmonger/sysstat/rd_stats.h
101
- - ext/perfmonger/sysstat/sysconfig.h
144
+ - lib/exec/operationBinding.rb.svn-base
145
+ - lib/exec/perfmonger-player_darwin_amd64
146
+ - lib/exec/perfmonger-player_linux_386
147
+ - lib/exec/perfmonger-player_linux_amd64
148
+ - lib/exec/perfmonger-recorder_darwin_amd64
149
+ - lib/exec/perfmonger-recorder_linux_386
150
+ - lib/exec/perfmonger-recorder_linux_amd64
151
+ - lib/exec/perfmonger-summarizer_darwin_amd64
152
+ - lib/exec/perfmonger-summarizer_linux_386
153
+ - lib/exec/perfmonger-summarizer_linux_amd64
154
+ - lib/exec/perfmonger-summary_linux_386
155
+ - lib/exec/perfmonger-summary_linux_amd64
102
156
  - lib/perfmonger.rb
103
157
  - lib/perfmonger/cli.rb
104
158
  - lib/perfmonger/command/base_command.rb
159
+ - lib/perfmonger/command/core.rb
105
160
  - lib/perfmonger/command/fingerprint.rb
161
+ - lib/perfmonger/command/live.rb
162
+ - lib/perfmonger/command/play.rb
106
163
  - lib/perfmonger/command/plot.rb
107
164
  - lib/perfmonger/command/record.rb
108
165
  - lib/perfmonger/command/record_option.rb
@@ -112,43 +169,58 @@ files:
112
169
  - lib/perfmonger/command/summary.rb
113
170
  - lib/perfmonger/config.rb
114
171
  - lib/perfmonger/version.rb
172
+ - misc/_perfmonger
173
+ - misc/perfmonger-completion.bash
115
174
  - misc/release-howto.txt
116
175
  - misc/sample-cpu.png
117
176
  - misc/sample-read-iops.png
118
177
  - perfmonger.gemspec
119
- - test/run-test.sh
120
- - test/spec/bin_spec.rb
121
- - test/spec/data/2devices.expected
122
- - test/spec/data/2devices.output
123
- - test/spec/spec_helper.rb
124
- - test/spec/summary_spec.rb
125
- - test/test-perfmonger.c
126
- - test/test.h
178
+ - spec/data/busy100.pgr
179
+ - spec/fingerprint_spec.rb
180
+ - spec/live_spec.rb
181
+ - spec/perfmonger_spec.rb
182
+ - spec/play_spec.rb
183
+ - spec/plot_spec.rb
184
+ - spec/record_spec.rb
185
+ - spec/spec_helper.rb
186
+ - spec/stat_spec.rb
187
+ - spec/summary_spec.rb
188
+ - spec/support/aruba.rb
189
+ - wercker.yml
127
190
  homepage: http://github.com/hayamiz/perfmonger/
128
191
  licenses:
129
192
  - GPL-2
130
193
  metadata: {}
131
- post_install_message: ! "\n============================================================\n\nThank
132
- you for installing perfmonger.\nTry to start performance monitoring with:\n\n perfmonger
133
- record\n\nEnjoy.\n\n============================================================\n\n"
194
+ post_install_message: |2+
195
+
196
+ ============================================================
197
+
198
+ Thank you for installing perfmonger.
199
+ Try to start performance monitoring with:
200
+
201
+ perfmonger record
202
+
203
+ Enjoy.
204
+
205
+ ============================================================
206
+
134
207
  rdoc_options: []
135
208
  require_paths:
136
209
  - lib
137
210
  required_ruby_version: !ruby/object:Gem::Requirement
138
211
  requirements:
139
- - - ! '>='
212
+ - - ">="
140
213
  - !ruby/object:Gem::Version
141
- version: 1.9.0
214
+ version: 1.9.3
142
215
  required_rubygems_version: !ruby/object:Gem::Requirement
143
216
  requirements:
144
- - - ! '>='
217
+ - - ">="
145
218
  - !ruby/object:Gem::Version
146
219
  version: '0'
147
220
  requirements: []
148
221
  rubyforge_project:
149
- rubygems_version: 2.4.5
222
+ rubygems_version: 2.2.2
150
223
  signing_key:
151
224
  specification_version: 4
152
225
  summary: yet anothor performance measurement/monitoring tool
153
226
  test_files: []
154
- has_rdoc:
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # coding: utf-8
3
-
4
- require 'mkmf'
5
-
6
- $objs = ["perfmonger_record.o", "sysstat/common.o", "sysstat/ioconf.o", "sysstat/iostat.o", "sysstat/mpstat.o", "sysstat/rd_stats.o"]
7
-
8
- $cleanfiles += ["perfmonger_record.o", "sysstat/common.o", "sysstat/ioconf.o", "sysstat/iostat.o", "sysstat/mpstat.o", "sysstat/rd_stats.o"]
9
-
10
- create_makefile 'perfmonger/perfmonger_record'
11
-
12
- mk = open('Makefile').read
13
-
14
- mk.gsub!(/^LDSHARED = .*$/, "LDSHARED = $(CC)")
15
- mk.gsub!(/^DLLIB = .*$/, "DLLIB = $(TARGET)")
16
-
17
- open('Makefile', 'w') do |f|
18
- f.write(mk)
19
- end
@@ -1,58 +0,0 @@
1
- /* -*- indent-tabs-mode: nil -*- */
2
-
3
- #ifndef PERFMONGER_H
4
- #define PERFMONGER_H
5
-
6
- #include <unistd.h>
7
- #include <stdio.h>
8
- #include <stdlib.h>
9
- #include <stdarg.h>
10
- #include <string.h>
11
- #include <math.h>
12
- #include <ctype.h>
13
- #include <limits.h>
14
- #include <stdbool.h>
15
- #include <pthread.h>
16
- #include <sys/socket.h>
17
- #include <netinet/in.h>
18
- #include <arpa/inet.h>
19
- #include <sys/time.h>
20
- #include <signal.h>
21
-
22
- #include "sysstat/libsysstat.h"
23
-
24
-
25
- typedef struct {
26
- // switches
27
- bool report_cpu;
28
- bool report_io;
29
- bool report_ctxsw;
30
-
31
- // device nr and list
32
- int nr_dev;
33
- char **dev_list;
34
- bool all_devices;
35
-
36
- // OUTPUT FILE
37
- FILE *output;
38
-
39
- // data collection interval
40
- double interval;
41
- bool interval_backoff;
42
-
43
- double start_delay;
44
-
45
- double timeout;
46
-
47
- bool verbose;
48
- } option_t;
49
-
50
- int parse_args(int argc, char **argv, option_t *opt);
51
- void print_help(void);
52
- void init_subsystem(option_t *opt);
53
- void destroy_subsystem(option_t *opt);
54
-
55
- void collector_loop(option_t *opt);
56
- void output_stat(option_t *opt, int curr);
57
-
58
- #endif