perfmonger 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10a0e056a4c32cbdcd8fda187002844cd405f5cb
4
- data.tar.gz: 6e06674d6d084318310627d557d7ae44255ef75e
3
+ metadata.gz: bb47ad299c6b0e503298b6fd345357760f6db238
4
+ data.tar.gz: bc212e88228a080c65dfedbb8c96437130d03838
5
5
  SHA512:
6
- metadata.gz: 096dc5864583310417f8c2906305f2806bf1a104b4ea7b5c942b61c271c9c0b997338eb8fc2bbd2de8458fe027cb6856a8034d7f5c030c9a97892db3b5741143
7
- data.tar.gz: 6e01993d4c7bab480c0161f23d415dc608d5ce0409a5670193e8fa11b39b9c13359805ed7eac72410a37b2966125599a990865bcd4be24e16835548e64b86d3b
6
+ metadata.gz: 9a4f21ab77b86679b78a9ca8628bc6bfbecec598ab2001397a6bb22aaa78cb4aa2cb7aa8de787e858da05666232161c59e53d980a6952355f083bd337350d84f
7
+ data.tar.gz: d5ac7fadddd9ae96b9da5d4036081fff64f7737db49259ac7ec406cc11491211662b001479c01039c674b0423ce3f6346cf8234e268860362baa4789bed61521
data/NEWS CHANGED
@@ -1,3 +1,9 @@
1
+ ## 2016-10-02: PerfMonger 0.7.1 released
2
+
3
+ * Bug fix
4
+ * [record] subcommand:
5
+ * Parse /proc/stat with 10 columns (9 values) correctly
6
+
1
7
  ## 2015-03-08: PerfMonger 0.7.0 released
2
8
 
3
9
  * New features
data/core/build.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  READLINK=$(type -p greadlink readlink | head -1)
4
4
  cd $(dirname $($READLINK -f $0))
5
5
 
6
- if [ $1 = "-" ]; then
6
+ if [[ $1 = "-" ]]; then
7
7
  # do self build
8
8
  case `uname -s` in
9
9
  (Linux)
@@ -109,6 +109,7 @@ func ReadCpuStat(record *StatRecord) error {
109
109
  var cpu string
110
110
  line := scan.Text()
111
111
  if line[0:4] == "cpu " {
112
+ // Linux 2.6.33 or later
112
113
  _, err = fmt.Sscanf(line,
113
114
  "%s %d %d %d %d %d %d %d %d %d %d",
114
115
  &cpu,
@@ -122,8 +123,24 @@ func ReadCpuStat(record *StatRecord) error {
122
123
  &record.Cpu.All.Steal,
123
124
  &record.Cpu.All.Guest,
124
125
  &record.Cpu.All.GuestNice)
126
+ if err == io.EOF {
127
+ // Linux 2.6.24 or later
128
+ _, err = fmt.Sscanf(line,
129
+ "%s %d %d %d %d %d %d %d %d %d",
130
+ &cpu,
131
+ &record.Cpu.All.User,
132
+ &record.Cpu.All.Nice,
133
+ &record.Cpu.All.Sys,
134
+ &record.Cpu.All.Idle,
135
+ &record.Cpu.All.Iowait,
136
+ &record.Cpu.All.Hardirq,
137
+ &record.Cpu.All.Softirq,
138
+ &record.Cpu.All.Steal,
139
+ &record.Cpu.All.Guest)
140
+ record.Cpu.All.GuestNice = 0
141
+ }
125
142
  if err != nil {
126
- return err
143
+ panic(err)
127
144
  }
128
145
  } else if line[0:3] == "cpu" {
129
146
  var n_core int
@@ -131,10 +148,11 @@ func ReadCpuStat(record *StatRecord) error {
131
148
  // assume n_core < 10000
132
149
  _, err = fmt.Sscanf(line[3:7], "%d", &n_core)
133
150
  if err != nil {
134
- return err
151
+ panic(err)
135
152
  }
136
153
 
137
154
  core_stat = &record.Cpu.CoreStats[n_core]
155
+ // Linux 2.6.33 or later
138
156
  _, err = fmt.Sscanf(line,
139
157
  "%s %d %d %d %d %d %d %d %d %d %d",
140
158
  &cpu,
@@ -148,18 +166,33 @@ func ReadCpuStat(record *StatRecord) error {
148
166
  &core_stat.Steal,
149
167
  &core_stat.Guest,
150
168
  &core_stat.GuestNice)
169
+ if err == io.EOF {
170
+ // Linux 2.6.24 or later
171
+ _, err = fmt.Sscanf(line,
172
+ "%s %d %d %d %d %d %d %d %d %d",
173
+ &cpu,
174
+ &core_stat.User,
175
+ &core_stat.Nice,
176
+ &core_stat.Sys,
177
+ &core_stat.Idle,
178
+ &core_stat.Iowait,
179
+ &core_stat.Hardirq,
180
+ &core_stat.Softirq,
181
+ &core_stat.Steal,
182
+ &core_stat.Guest)
183
+ }
151
184
  if err != nil {
152
- return err
185
+ panic(err)
153
186
  }
154
187
  } else if line[0:5] == "ctxt " {
155
188
  _, err = fmt.Sscanf(line[4:], "%d", &record.Proc.ContextSwitch)
156
189
  if err != nil {
157
- return err
190
+ panic(err)
158
191
  }
159
192
  } else if line[0:10] == "processes " {
160
193
  _, err = fmt.Sscanf(line[10:], "%d", &record.Proc.Fork)
161
194
  if err != nil {
162
- return err
195
+ panic(err)
163
196
  }
164
197
  }
165
198
  }
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module PerfMonger
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
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.7.0
4
+ version: 0.7.1
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-03-07 00:00:00.000000000 Z
11
+ date: 2016-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -141,7 +141,6 @@ files:
141
141
  - data/assets/js/canvasjs.js
142
142
  - data/assets/js/canvasjs.min.js
143
143
  - data/sysstat.ioconf
144
- - lib/exec/operationBinding.rb.svn-base
145
144
  - lib/exec/perfmonger-player_darwin_amd64
146
145
  - lib/exec/perfmonger-player_linux_386
147
146
  - lib/exec/perfmonger-player_linux_amd64
@@ -151,8 +150,6 @@ files:
151
150
  - lib/exec/perfmonger-summarizer_darwin_amd64
152
151
  - lib/exec/perfmonger-summarizer_linux_386
153
152
  - lib/exec/perfmonger-summarizer_linux_amd64
154
- - lib/exec/perfmonger-summary_linux_386
155
- - lib/exec/perfmonger-summary_linux_amd64
156
153
  - lib/perfmonger.rb
157
154
  - lib/perfmonger/cli.rb
158
155
  - lib/perfmonger/command/base_command.rb
@@ -219,8 +216,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
216
  version: '0'
220
217
  requirements: []
221
218
  rubyforge_project:
222
- rubygems_version: 2.2.2
219
+ rubygems_version: 2.4.5.1
223
220
  signing_key:
224
221
  specification_version: 4
225
222
  summary: yet anothor performance measurement/monitoring tool
226
- test_files: []
223
+ test_files:
224
+ - spec/data/busy100.pgr
225
+ - spec/fingerprint_spec.rb
226
+ - spec/live_spec.rb
227
+ - spec/perfmonger_spec.rb
228
+ - spec/play_spec.rb
229
+ - spec/plot_spec.rb
230
+ - spec/record_spec.rb
231
+ - spec/spec_helper.rb
232
+ - spec/stat_spec.rb
233
+ - spec/summary_spec.rb
234
+ - spec/support/aruba.rb
@@ -1,59 +0,0 @@
1
- package subsystem
2
-
3
- import (
4
- "time"
5
- )
6
-
7
- /*
8
-
9
- PerfMonger binary format:
10
-
11
- 1. Common header
12
- * platform type tag
13
- * host info
14
- * timestamp
15
- * ...
16
- 2. Platform-dependent header
17
- * List of devices
18
- * List of NICs
19
- * List of IRQs
20
- * CPU topology
21
- * ...
22
- 3. Record section
23
- * Platform-dependent record data stream
24
-
25
- */
26
-
27
-
28
-
29
- //
30
- // Common header
31
- //
32
-
33
- const (
34
- Linux = 1
35
- Darwin = 2
36
- )
37
-
38
- type PlatformType int
39
-
40
- type CommonHeader struct {
41
- Platform PlatformType
42
- Hostname string
43
- StartTime time.Time
44
- }
45
-
46
-
47
- //
48
- // Platform-dependent header
49
- //
50
-
51
- type LinuxDevice struct {
52
- Name string
53
- Parts []string
54
- }
55
-
56
- type LinuxHeader struct {
57
- Devices map[string]LinuxDevice
58
- DevsParts []string
59
- }
Binary file