perfmonger 0.12.1 → 0.13.1
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.
- checksums.yaml +4 -4
- data/NEWS +7 -1
- data/core/cmd/perfmonger-player/perfmonger-player.go +33 -10
- data/core/cmd/perfmonger-summarizer/perfmonger-summarizer.go +2 -1
- data/lib/exec/perfmonger-player_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-player_linux_amd64 +0 -0
- data/lib/exec/perfmonger-plot-formatter_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-plot-formatter_linux_amd64 +0 -0
- data/lib/exec/perfmonger-recorder_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-recorder_linux_amd64 +0 -0
- data/lib/exec/perfmonger-summarizer_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-summarizer_linux_amd64 +0 -0
- data/lib/exec/perfmonger-viewer_darwin_amd64 +0 -0
- data/lib/exec/perfmonger-viewer_linux_amd64 +0 -0
- data/lib/perfmonger/command/play.rb +10 -0
- data/lib/perfmonger/version.rb +1 -1
- metadata +4 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a2bc69e72d02745481dafb5bec13073d4289a3f38cdf8eb253416e649e56ff5
|
4
|
+
data.tar.gz: fd5db8b9b288b62060df2ab5881ec8c777c320479d53420ddef3e4420ade9c9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7184d7eeb69b60188a740031143eede5188b56dbf84cd6a4bdd28302439faba79f390f8baf27f1e33275d04355c1e99c42eb09b1eb663a243c0046e1cc5a29e
|
7
|
+
data.tar.gz: cda569ba86554c985e46249d77d1fdc606fbe126150591dcec55ccbe82eabd13b6081ed428c6b7301004c1955fdf00273549a82696f6ed07cd3c2bb55387dd45
|
data/NEWS
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
##
|
1
|
+
## 2021-XX-XX: PerfMonger 0.14.0
|
2
|
+
|
3
|
+
## 2021-07-26: PerfMonger 0.13.1
|
4
|
+
* New features
|
5
|
+
* [play] subcommand:
|
6
|
+
* Added --disk-only option to filter results of not interesting disks
|
7
|
+
* Note: v0.13.0 is yanked from rubygems.org
|
2
8
|
|
3
9
|
## 2021-07-08: PerfMonger 0.12.1
|
4
10
|
* Bug fixes
|
@@ -9,16 +9,19 @@ import (
|
|
9
9
|
"fmt"
|
10
10
|
"io"
|
11
11
|
"os"
|
12
|
+
"regexp"
|
12
13
|
|
13
14
|
projson "github.com/hayamiz/go-projson"
|
15
|
+
core "github.com/hayamiz/perfmonger/core"
|
14
16
|
ss "github.com/hayamiz/perfmonger/core/subsystem"
|
15
|
-
core "github.com/hayamiz/perfmonger/core"
|
16
17
|
)
|
17
18
|
|
18
19
|
type PlayerOption struct {
|
19
|
-
logfile
|
20
|
-
color
|
21
|
-
pretty
|
20
|
+
logfile string
|
21
|
+
color bool
|
22
|
+
pretty bool
|
23
|
+
disk_only string
|
24
|
+
disk_only_regex *regexp.Regexp
|
22
25
|
}
|
23
26
|
|
24
27
|
var option PlayerOption
|
@@ -50,10 +53,11 @@ func showInterruptStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cu
|
|
50
53
|
return nil
|
51
54
|
}
|
52
55
|
|
53
|
-
func showDiskStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cur_rec *ss.StatRecord) error {
|
54
|
-
dusage, err := ss.
|
56
|
+
func showDiskStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cur_rec *ss.StatRecord, disk_only_regex *regexp.Regexp) error {
|
57
|
+
dusage, err := ss.GetDiskUsage1(
|
55
58
|
prev_rec.Time, prev_rec.Disk,
|
56
|
-
cur_rec.Time, cur_rec.Disk
|
59
|
+
cur_rec.Time, cur_rec.Disk,
|
60
|
+
option.disk_only_regex)
|
57
61
|
if err != nil {
|
58
62
|
return err
|
59
63
|
}
|
@@ -94,7 +98,9 @@ func showMemStat(printer *projson.JsonPrinter, cur_rec *ss.StatRecord) error {
|
|
94
98
|
return nil
|
95
99
|
}
|
96
100
|
|
97
|
-
func showStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cur_rec *ss.StatRecord
|
101
|
+
func showStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cur_rec *ss.StatRecord,
|
102
|
+
disk_only_regex *regexp.Regexp) error {
|
103
|
+
|
98
104
|
printer.Reset()
|
99
105
|
if option.pretty {
|
100
106
|
printer.SetStyle(projson.SmartStyle)
|
@@ -102,6 +108,7 @@ func showStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cur_rec *ss
|
|
102
108
|
if option.color {
|
103
109
|
printer.SetColor(true)
|
104
110
|
}
|
111
|
+
|
105
112
|
printer.BeginObject()
|
106
113
|
printer.PutKey("time")
|
107
114
|
printer.PutFloatFmt(float64(cur_rec.Time.UnixNano())/1e9, "%.3f")
|
@@ -122,7 +129,7 @@ func showStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cur_rec *ss
|
|
122
129
|
}
|
123
130
|
}
|
124
131
|
if cur_rec.Disk != nil {
|
125
|
-
err := showDiskStat(printer, prev_rec, cur_rec)
|
132
|
+
err := showDiskStat(printer, prev_rec, cur_rec, disk_only_regex)
|
126
133
|
if err != nil {
|
127
134
|
return err
|
128
135
|
}
|
@@ -148,9 +155,25 @@ func showStat(printer *projson.JsonPrinter, prev_rec *ss.StatRecord, cur_rec *ss
|
|
148
155
|
func parseArgs() {
|
149
156
|
flag.BoolVar(&option.color, "color", false, "Use colored JSON output")
|
150
157
|
flag.BoolVar(&option.pretty, "pretty", false, "Use human readable JSON output")
|
158
|
+
flag.StringVar(&option.disk_only, "disk-only", "", "Select disk devices by regex")
|
151
159
|
|
152
160
|
flag.Parse()
|
153
161
|
|
162
|
+
if len(flag.Args()) < 1 {
|
163
|
+
fmt.Fprintln(os.Stderr, "Insufficient argument")
|
164
|
+
os.Exit(1)
|
165
|
+
}
|
166
|
+
|
167
|
+
option.disk_only_regex = nil
|
168
|
+
|
169
|
+
if option.disk_only != "" {
|
170
|
+
var err error
|
171
|
+
option.disk_only_regex, err = regexp.Compile(option.disk_only)
|
172
|
+
if err != nil {
|
173
|
+
panic(err)
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
154
177
|
option.logfile = flag.Arg(0)
|
155
178
|
}
|
156
179
|
|
@@ -219,7 +242,7 @@ func main() {
|
|
219
242
|
panic(err)
|
220
243
|
}
|
221
244
|
|
222
|
-
err = showStat(printer, prev_rec, cur_rec)
|
245
|
+
err = showStat(printer, prev_rec, cur_rec, option.disk_only_regex)
|
223
246
|
if err != nil {
|
224
247
|
printer.Reset()
|
225
248
|
fmt.Fprintln(os.Stderr, "skip by err")
|
@@ -12,8 +12,8 @@ import (
|
|
12
12
|
"sort"
|
13
13
|
|
14
14
|
projson "github.com/hayamiz/go-projson"
|
15
|
-
ss "github.com/hayamiz/perfmonger/core/subsystem"
|
16
15
|
"github.com/hayamiz/perfmonger/core"
|
16
|
+
ss "github.com/hayamiz/perfmonger/core/subsystem"
|
17
17
|
)
|
18
18
|
|
19
19
|
type SummaryOption struct {
|
@@ -39,6 +39,7 @@ func parseArgs() {
|
|
39
39
|
flag.Parse()
|
40
40
|
|
41
41
|
if len(flag.Args()) < 1 {
|
42
|
+
fmt.Fprintln(os.Stderr, "Insufficient argument")
|
42
43
|
os.Exit(1)
|
43
44
|
}
|
44
45
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -26,6 +26,10 @@ EOS
|
|
26
26
|
@pretty = true
|
27
27
|
end
|
28
28
|
|
29
|
+
@disk_only_regex = nil
|
30
|
+
@parser.on('--disk-only REGEX', "Select disk devices that matches REGEX (Ex. 'sd[b-d]')") do |regex|
|
31
|
+
@disk_only_regex = regex
|
32
|
+
end
|
29
33
|
end
|
30
34
|
|
31
35
|
def parse_args(argv)
|
@@ -62,6 +66,12 @@ EOS
|
|
62
66
|
if @pretty
|
63
67
|
cmd << "-pretty"
|
64
68
|
end
|
69
|
+
|
70
|
+
if @disk_only_regex
|
71
|
+
cmd << "-disk-only"
|
72
|
+
cmd << @disk_only_regex
|
73
|
+
end
|
74
|
+
|
65
75
|
cmd << @logfile
|
66
76
|
|
67
77
|
Process.exec(*cmd)
|
data/lib/perfmonger/version.rb
CHANGED
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.
|
4
|
+
version: 0.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuto HAYAMIZU
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -216,26 +216,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
216
|
- !ruby/object:Gem::Version
|
217
217
|
version: '0'
|
218
218
|
requirements: []
|
219
|
-
|
220
|
-
rubygems_version: 2.7.6
|
219
|
+
rubygems_version: 3.1.6
|
221
220
|
signing_key:
|
222
221
|
specification_version: 4
|
223
222
|
summary: yet anothor performance measurement/monitoring tool
|
224
|
-
test_files:
|
225
|
-
- spec/data/busy100.pgr
|
226
|
-
- spec/data/busy100.pgr.gz
|
227
|
-
- spec/data/busy100.pgr.played
|
228
|
-
- spec/data/busy100.pgr.plot-formatted.cpu.dat
|
229
|
-
- spec/data/busy100.pgr.plot-formatted.disk.dat
|
230
|
-
- spec/data/busy100.pgr.summary
|
231
|
-
- spec/data/busy100.pgr.summary.json
|
232
|
-
- spec/fingerprint_spec.rb
|
233
|
-
- spec/live_spec.rb
|
234
|
-
- spec/perfmonger_spec.rb
|
235
|
-
- spec/play_spec.rb
|
236
|
-
- spec/plot_spec.rb
|
237
|
-
- spec/record_spec.rb
|
238
|
-
- spec/spec_helper.rb
|
239
|
-
- spec/stat_spec.rb
|
240
|
-
- spec/summary_spec.rb
|
241
|
-
- spec/support/aruba.rb
|
223
|
+
test_files: []
|