perfmonger 0.10.2 → 0.12.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 +5 -5
- data/.gitignore +3 -0
- data/.travis.yml +9 -8
- data/HOWTO.md +0 -1
- data/NEWS +49 -5
- data/README.md +77 -27
- data/Rakefile +33 -11
- data/core/Makefile +22 -31
- data/core/build.sh +6 -8
- data/core/cmd/perfmonger-player/perfmonger-player.go +247 -0
- data/core/{perfmonger-plot-formatter.go → cmd/perfmonger-plot-formatter/perfmonger-plot-formatter.go} +20 -5
- data/core/{perfmonger-recorder.go → cmd/perfmonger-recorder/perfmonger-recorder.go} +22 -2
- data/core/{perfmonger-summarizer.go → cmd/perfmonger-summarizer/perfmonger-summarizer.go} +22 -15
- data/core/cmd/perfmonger-viewer/perfmonger-viewer.go +164 -0
- data/core/go.mod +10 -0
- data/core/go.sum +17 -0
- data/core/subsystem/Makefile +4 -0
- data/core/subsystem/perfmonger_linux.go +95 -0
- data/core/subsystem/perfmonger_linux_test.go +40 -0
- data/core/subsystem/stat.go +70 -0
- data/core/subsystem/stat_test.go +9 -0
- data/core/subsystem/usage.go +223 -66
- data/core/subsystem/usage_test.go +62 -32
- data/core/utils.go +2 -2
- data/{bin → exe}/perfmonger +0 -0
- 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/fingerprint.rb +26 -1
- data/lib/perfmonger/command/live.rb +19 -0
- data/lib/perfmonger/command/play.rb +16 -0
- data/lib/perfmonger/command/plot.rb +23 -9
- data/lib/perfmonger/command/record.rb +24 -3
- data/lib/perfmonger/command/record_option.rb +16 -0
- data/lib/perfmonger/command/server.rb +1 -1
- data/lib/perfmonger/version.rb +1 -1
- data/misc/werker-box/Dockerfile +34 -0
- data/misc/werker-box/build-push.sh +7 -0
- data/perfmonger.gemspec +2 -1
- data/spec/data/busy100.pgr.played +3 -3
- data/spec/fingerprint_spec.rb +1 -1
- data/spec/live_spec.rb +2 -3
- data/spec/perfmonger_spec.rb +1 -1
- data/spec/play_spec.rb +1 -1
- data/spec/plot_spec.rb +16 -1
- data/spec/record_spec.rb +10 -1
- data/spec/spec_helper.rb +28 -3
- data/spec/stat_spec.rb +2 -2
- data/spec/summary_spec.rb +1 -1
- data/wercker.yml +29 -16
- metadata +34 -14
- data/core/perfmonger-player.go +0 -196
- data/lib/exec/perfmonger-player_linux_386 +0 -0
- data/lib/exec/perfmonger-plot-formatter_linux_386 +0 -0
- data/lib/exec/perfmonger-recorder_linux_386 +0 -0
- data/lib/exec/perfmonger-summarizer_linux_386 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9610baac2556f61a8deb2cab5c7d4c10dac9c7da69c0c07a2f7d2b5f2414199e
|
4
|
+
data.tar.gz: 1e94e2c14421eabddd25f60abb8ef6e749aa57a557c4d661830b52fc5f91d7ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a5f69061b79e2dcafe707bdb24b5a7be0443df2130bd928f33a7aba7a56623a946979ac22e0a82ce367f6d8d17d66facaf7286c6fe1c09016f8cedfc43dc5f6
|
7
|
+
data.tar.gz: 9754fb8acc4b1a521c2daf2a67017d95ec018b414f7f808989589efa498f3f66003f93d1d8d6aa7455a008259486f7ea71dae8c8d2934c52ed0b55e9dd0b0a1f
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,24 +1,25 @@
|
|
1
|
-
|
2
1
|
language: ruby
|
3
2
|
install:
|
4
3
|
- sudo apt-get update
|
5
4
|
- sudo apt-get install gnuplot
|
6
5
|
- gnuplot -e "set terminal" < /dev/null 2>&1
|
7
6
|
- bundle install
|
8
|
-
- go_version="1.
|
7
|
+
- go_version="1.14.1"
|
9
8
|
- wget http://golang.org/dl/go${go_version}.linux-amd64.tar.gz
|
10
9
|
- sudo tar -C /usr/local -xzf go${go_version}.linux-amd64.tar.gz
|
11
10
|
- export PATH=$PATH:/usr/local/go/bin
|
12
11
|
- export GOPATH="$HOME/go"
|
13
12
|
- export PATH="$PATH:$GOPATH/bin"
|
14
13
|
- mkdir -p "$HOME/go/{src,pkg,bin}"
|
15
|
-
- go get -u golang.org/x/crypto/ssh/terminal
|
16
|
-
- go get -u github.com/hayamiz/perfmonger/core/subsystem
|
17
14
|
rvm:
|
18
|
-
-
|
19
|
-
- 2.
|
20
|
-
- 2.
|
21
|
-
- 2.
|
15
|
+
- 2.4.9
|
16
|
+
- 2.5.7
|
17
|
+
- 2.6.5
|
18
|
+
- 2.7.0
|
22
19
|
script:
|
20
|
+
- rake go_get
|
23
21
|
- rake spec
|
24
22
|
- rake test_core
|
23
|
+
notifications:
|
24
|
+
slack:
|
25
|
+
secure: fH8tRyxWHL60OV6QuJlzig9lCLbjfpHx8E6D2EzgQz7+/wqAxtoTUyiN7mbpEJa4hyQeZfpmMpDTnl2tHD6eI8yqjAsY4Q+jt21tCKyrKMegq9Pypd4eMP4o+DupT2mXm0K3cZ2Kgb+yP8AuJPoTy20j3kpmnDFWdqRnhgpBLC8=
|
data/HOWTO.md
CHANGED
data/NEWS
CHANGED
@@ -1,10 +1,54 @@
|
|
1
|
-
##
|
1
|
+
## 20XX-XX-XX: PerfMonger 0.13.0
|
2
|
+
|
3
|
+
## 2021-07-08: PerfMonger 0.12.1
|
4
|
+
* Bug fixes
|
5
|
+
* [record] subcommand:
|
6
|
+
* --kill waits until a recorder process surely exits
|
7
|
+
|
8
|
+
## 2021-05-10: PerfMonger 0.12.0
|
9
|
+
* New features
|
10
|
+
* [record] subcommand:
|
11
|
+
* Add memory usage collection
|
12
|
+
|
13
|
+
## 2021-02-10: PerfMonger 0.11.3
|
14
|
+
* Bug fixes
|
15
|
+
* [plot] subcommand:
|
16
|
+
* Fall back to available gnuplot terminal
|
17
|
+
* Changes
|
18
|
+
* [plot] subcommand:
|
19
|
+
* Added --with-gnuplot option for specifying gnuplot binary
|
20
|
+
|
21
|
+
## 2020-03-31: PerfMonger 0.11.2
|
2
22
|
* Bug fixes
|
3
23
|
* [plot] subcommand:
|
4
|
-
*
|
24
|
+
* Remove temporary directory correctly
|
25
|
+
* Changes
|
26
|
+
* CI environment
|
27
|
+
* Changed golang version to 1.14
|
28
|
+
* Dropped support of ruby older than 2.4
|
29
|
+
* Added ruby 2.6 and 2.7
|
30
|
+
|
31
|
+
## 2018-05-15: PerfMonger 0.11.1
|
32
|
+
* Bug fixes
|
33
|
+
* [record] subcommand:
|
34
|
+
* Fixed session detection mechanism (did not worked for execution under sudo)
|
5
35
|
|
6
|
-
##
|
7
|
-
*
|
36
|
+
## 2018-05-15: PerfMonger 0.11.0
|
37
|
+
* New features
|
38
|
+
* [play] subcommand:
|
39
|
+
* Add --color, --pretty option for pretty JSON output
|
40
|
+
* [live] subcommand:
|
41
|
+
* Add --color, --pretty option for pretty JSON output
|
42
|
+
* [fingerprint] subcommand:
|
43
|
+
* Collect additional info: numactl, ec2-metadata
|
44
|
+
* Bug fixes
|
45
|
+
* [plot] subcommand:
|
46
|
+
* Correctly filter out disk usages by --disk-only option
|
47
|
+
* Changes
|
48
|
+
* Dropped support of i386
|
49
|
+
* Use go-projson for JSON output
|
50
|
+
* [plot] subcommand:
|
51
|
+
* Stacked graphs layout in allcpu.pdf
|
8
52
|
|
9
53
|
## 2017-06-19: PerfMonger 0.10.0
|
10
54
|
* New features
|
@@ -204,4 +248,4 @@ PerfMonger is available on yum repository from this release.
|
|
204
248
|
## 2011-12-09: PerfMonger 0.1.0 released
|
205
249
|
|
206
250
|
* New features
|
207
|
-
* I/O performance monitoring
|
251
|
+
* I/O performance monitoring
|
data/README.md
CHANGED
@@ -5,31 +5,97 @@
|
|
5
5
|
|
6
6
|
[](https://app.wercker.com/project/bykey/44c3ade6a2406d337df6d93097a52fdf)
|
7
7
|
|
8
|
-
PerfMonger is
|
9
|
-
|
8
|
+
PerfMonger is a system performance monitor which enables high-resolution and holistic performance measurement with the programmer friendly interface.
|
9
|
+
|
10
|
+
* High-resolution: sub-second level monitoring is possible!
|
11
|
+
* Holistic performance measurement: monitoring CPU, Disk I/O, Network all at once.
|
12
|
+
* Programmer friendly: PerfMonger speaks monitoring results in JSON format, which makes later performance analysis much easier (ex. [jq](https://github.com/stedolan/jq)).
|
10
13
|
|
11
14
|
**CAUTION: PerfMonger is still in early stage, so there may be a drastic change in the future. Do not use it for critical jobs**
|
12
15
|
|
13
16
|
## Target platform
|
14
17
|
|
15
18
|
* GNU/Linux
|
19
|
+
* Mac OS X (experimental support)
|
16
20
|
|
17
|
-
##
|
18
|
-
|
19
|
-
* Ruby 1.9.3 or later
|
20
|
-
* gnuplot 4.6.0 or later (optional)
|
21
|
-
|
22
|
-
Note: You need Cutter unit testing framework for building/running tests.
|
23
|
-
|
24
|
-
## How to install
|
21
|
+
## How to installation
|
25
22
|
|
26
23
|
gem install perfmonger
|
27
24
|
|
25
|
+
You need gnuplot 4.6.0 or later build with cairo terminals for plotting measurement data with `perfmonger plot` command.
|
26
|
+
|
28
27
|
### Build from source
|
29
28
|
|
29
|
+
You need Ruby 2.2 or later, and Go 1.8 or later to build perfmonger.
|
30
|
+
|
31
|
+
bundle
|
30
32
|
rake build
|
31
33
|
|
32
|
-
##
|
34
|
+
## Getting started
|
35
|
+
|
36
|
+
Basic usage of PerfMonger is:
|
37
|
+
|
38
|
+
* Run `perfmonger record` to record performance information logs
|
39
|
+
* Run `perfmonger play` to show performance information logs in JSON format
|
40
|
+
|
41
|
+
`perfmonger play` repatedly prints records of system performance including CPU
|
42
|
+
usages, disk usages, and network usages. One line includes only one record, so
|
43
|
+
you can easily process output records with `jq`, or any scripting languages like
|
44
|
+
Ruby, Python, and etc.
|
45
|
+
|
46
|
+
Pretty-printed structure of a record is as follows:
|
47
|
+
|
48
|
+
```
|
49
|
+
{"time": 1500043743.504, # timestamp in unix epoch time
|
50
|
+
"cpu": { # CPU usages
|
51
|
+
"num_core": 2, # the number of cores
|
52
|
+
"all": { # aggregated CPU usage (max = num_core * 100%)
|
53
|
+
"usr": 50.0,
|
54
|
+
"sys": 50.0,
|
55
|
+
"idle": 100.0,
|
56
|
+
...
|
57
|
+
},
|
58
|
+
"cores": [ # Usage of each CPU core
|
59
|
+
{
|
60
|
+
"usr": 25.0,
|
61
|
+
"sys": 25.0,
|
62
|
+
"idle": 50.0,
|
63
|
+
...
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"usr": 25.0,
|
67
|
+
"sys": 25.0,
|
68
|
+
"idle": 50.0,
|
69
|
+
...
|
70
|
+
}
|
71
|
+
]
|
72
|
+
},
|
73
|
+
"disk": { # Disk usages
|
74
|
+
"devices": ["sda"], # List of disk devices
|
75
|
+
"sda": { # Usage of device 'sda'
|
76
|
+
"riops": 10.0, # The number of read I/O per second
|
77
|
+
"wiops": 20.0, # The number of write I/O per second
|
78
|
+
"rkbyteps": 80.0, # Read transfer rate in KB/s
|
79
|
+
"wkbyteps": 160.0, # Write transfer rate in KB/s
|
80
|
+
...
|
81
|
+
}
|
82
|
+
"total": { # Aggregated usage of all devices
|
83
|
+
"riops": 10.0,
|
84
|
+
"wiops": 20.0,
|
85
|
+
"rkbyteps": 80.0,
|
86
|
+
"wkbyteps": 160.0,
|
87
|
+
...
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
```
|
92
|
+
|
93
|
+
|
94
|
+
## Typical use cases
|
95
|
+
|
96
|
+
### `perfmonger live`: live performance monitoring
|
97
|
+
|
98
|
+
$ perfmonger live
|
33
99
|
|
34
100
|
### Monitor IO performance of /dev/sda for each 0.1 second
|
35
101
|
|
@@ -42,19 +108,3 @@ Note: You need Cutter unit testing framework for building/running tests.
|
|
42
108
|
### Monitor CPU usage and IO performance of /dev/sda, sdb for each 0.1 second
|
43
109
|
|
44
110
|
$ perfmonger record -i 0.1 -d sda -d sdb
|
45
|
-
|
46
|
-
### Plot CPU and IOPS
|
47
|
-
|
48
|
-
$ perfmonger record -i 0.1 -C -d sda > /tmp/perfmonger.log & sleep 10; pkill perfmonger
|
49
|
-
$ perfmonger plot -o /path/to/output_dir/ -Tpng /tmp/perfmonger.log
|
50
|
-
$ display /path/to/output_dir/read-iops.png
|
51
|
-
$ display /path/to/output_dir/cpu.png
|
52
|
-
|
53
|
-

|
54
|
-

|
55
|
-
|
56
|
-
## Special Thanks
|
57
|
-
|
58
|
-
Large portion of PerfMonger comes from
|
59
|
-
[SYSSTAT](http://sebastien.godard.pagesperso-orange.fr/) codebase. Thanks for
|
60
|
-
their great work.
|
data/Rakefile
CHANGED
@@ -2,12 +2,12 @@ require 'rubygems'
|
|
2
2
|
require 'rspec/core/rake_task'
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
|
5
|
-
task :default => [:spec, :test_core]
|
5
|
+
task :default => [:spec, :test_core, :analyze_core]
|
6
6
|
|
7
7
|
desc "Run all specs in spec directory"
|
8
8
|
RSpec::Core::RakeTask.new(:spec)
|
9
9
|
|
10
|
-
task :spec => [:
|
10
|
+
task :spec => [:cross_build_core]
|
11
11
|
|
12
12
|
desc "Cross build core recorder/player"
|
13
13
|
task :cross_build_core do
|
@@ -18,22 +18,44 @@ task :cross_build_core do
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
desc "Self build core recorder/player"
|
22
|
-
task :self_build_core do
|
23
|
-
Dir.chdir("./core") do
|
24
|
-
sh "./build.sh -"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
21
|
task :build => :cross_build_core
|
29
22
|
|
30
|
-
desc "
|
31
|
-
task :
|
23
|
+
desc "Install Golang libraries"
|
24
|
+
task :go_get do
|
25
|
+
sh "go get -u github.com/hayamiz/go-projson"
|
26
|
+
sh "go get -u github.com/hayamiz/perfmonger/core/subsystem"
|
27
|
+
sh "go get -u golang.org/x/crypto/ssh/terminal"
|
28
|
+
sh "go get -u github.com/mattn/go-isatty"
|
29
|
+
sh "go get -u github.com/nsf/termbox-go"
|
30
|
+
sh "go get -u github.com/jroimartin/gocui"
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Run tests of golang core library"
|
34
|
+
task :test_core => [:cross_build_core] do
|
32
35
|
Dir.chdir("./core/subsystem") do
|
36
|
+
# check coverage
|
33
37
|
sh "go test -v -cover"
|
34
38
|
end
|
35
39
|
end
|
36
40
|
|
41
|
+
desc "Run static-analysis of golang core library"
|
42
|
+
task :analyze_core => [:cross_build_core] do
|
43
|
+
# running static analysis
|
44
|
+
Dir.chdir("./core/subsystem") do
|
45
|
+
["linux", "darwin"].each do |platform|
|
46
|
+
puts "* ./core/subsystem"
|
47
|
+
sh "go vet perfmonger_#{platform}.go $(ls *.go | grep -v perfmonger_)"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
Dir["./core", "./core/cmd/*"].each do |dir|
|
52
|
+
Dir.chdir(dir) do
|
53
|
+
puts "* #{dir}"
|
54
|
+
sh "go vet *.go"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
37
59
|
desc "Removed generated files"
|
38
60
|
task :clean do
|
39
61
|
sh "make -C core clean"
|
data/core/Makefile
CHANGED
@@ -2,63 +2,54 @@
|
|
2
2
|
# generated by build.sh
|
3
3
|
|
4
4
|
GO_DEPS := subsystem/perfmonger_darwin.go subsystem/perfmonger.go subsystem/perfmonger_linux.go subsystem/perfmonger_linux_test.go subsystem/stat.go subsystem/stat_test.go subsystem/usage.go subsystem/usage_test.go utils.go
|
5
|
-
GO_SRC := utils.go
|
6
5
|
|
7
6
|
.PHONY: all build clean
|
8
7
|
|
9
8
|
all: build
|
10
9
|
|
11
10
|
|
12
|
-
../lib/exec/perfmonger-
|
13
|
-
go build -o
|
11
|
+
../lib/exec/perfmonger-recorder_linux_amd64: cmd/perfmonger-recorder/perfmonger-recorder.go $(GO_DEPS)
|
12
|
+
cd cmd/perfmonger-recorder && go build -o ../../$@ perfmonger-recorder.go
|
14
13
|
|
15
14
|
|
16
|
-
../lib/exec/perfmonger-
|
17
|
-
go build -o
|
15
|
+
../lib/exec/perfmonger-player_linux_amd64: cmd/perfmonger-player/perfmonger-player.go $(GO_DEPS)
|
16
|
+
cd cmd/perfmonger-player && go build -o ../../$@ perfmonger-player.go
|
18
17
|
|
19
18
|
|
20
|
-
../lib/exec/perfmonger-
|
21
|
-
go build -o
|
19
|
+
../lib/exec/perfmonger-viewer_linux_amd64: cmd/perfmonger-viewer/perfmonger-viewer.go $(GO_DEPS)
|
20
|
+
cd cmd/perfmonger-viewer && go build -o ../../$@ perfmonger-viewer.go
|
22
21
|
|
23
22
|
|
24
|
-
../lib/exec/perfmonger-
|
25
|
-
go build -o
|
23
|
+
../lib/exec/perfmonger-summarizer_linux_amd64: cmd/perfmonger-summarizer/perfmonger-summarizer.go $(GO_DEPS)
|
24
|
+
cd cmd/perfmonger-summarizer && go build -o ../../$@ perfmonger-summarizer.go
|
26
25
|
|
27
26
|
|
28
|
-
../lib/exec/perfmonger-
|
29
|
-
go build -o
|
27
|
+
../lib/exec/perfmonger-plot-formatter_linux_amd64: cmd/perfmonger-plot-formatter/perfmonger-plot-formatter.go $(GO_DEPS)
|
28
|
+
cd cmd/perfmonger-plot-formatter && go build -o ../../$@ perfmonger-plot-formatter.go
|
30
29
|
|
31
30
|
|
32
|
-
../lib/exec/perfmonger-
|
33
|
-
go build -o
|
31
|
+
../lib/exec/perfmonger-recorder_darwin_amd64: cmd/perfmonger-recorder/perfmonger-recorder.go $(GO_DEPS)
|
32
|
+
cd cmd/perfmonger-recorder && go build -o ../../$@ perfmonger-recorder.go
|
34
33
|
|
35
34
|
|
36
|
-
../lib/exec/perfmonger-
|
37
|
-
go build -o
|
35
|
+
../lib/exec/perfmonger-player_darwin_amd64: cmd/perfmonger-player/perfmonger-player.go $(GO_DEPS)
|
36
|
+
cd cmd/perfmonger-player && go build -o ../../$@ perfmonger-player.go
|
38
37
|
|
39
38
|
|
40
|
-
../lib/exec/perfmonger-
|
41
|
-
go build -o
|
39
|
+
../lib/exec/perfmonger-viewer_darwin_amd64: cmd/perfmonger-viewer/perfmonger-viewer.go $(GO_DEPS)
|
40
|
+
cd cmd/perfmonger-viewer && go build -o ../../$@ perfmonger-viewer.go
|
42
41
|
|
43
42
|
|
44
|
-
../lib/exec/perfmonger-
|
45
|
-
go build -o
|
43
|
+
../lib/exec/perfmonger-summarizer_darwin_amd64: cmd/perfmonger-summarizer/perfmonger-summarizer.go $(GO_DEPS)
|
44
|
+
cd cmd/perfmonger-summarizer && go build -o ../../$@ perfmonger-summarizer.go
|
46
45
|
|
47
46
|
|
48
|
-
../lib/exec/perfmonger-
|
49
|
-
go build -o
|
47
|
+
../lib/exec/perfmonger-plot-formatter_darwin_amd64: cmd/perfmonger-plot-formatter/perfmonger-plot-formatter.go $(GO_DEPS)
|
48
|
+
cd cmd/perfmonger-plot-formatter && go build -o ../../$@ perfmonger-plot-formatter.go
|
50
49
|
|
51
50
|
|
52
|
-
../lib/exec/perfmonger-summarizer_darwin_amd64
|
53
|
-
go build -o $@ perfmonger-summarizer.go $(GO_SRC)
|
54
|
-
|
55
|
-
|
56
|
-
../lib/exec/perfmonger-plot-formatter_darwin_amd64: perfmonger-plot-formatter.go $(GO_DEPS)
|
57
|
-
go build -o $@ perfmonger-plot-formatter.go $(GO_SRC)
|
58
|
-
|
59
|
-
|
60
|
-
build: ../lib/exec/perfmonger-recorder_linux_386 ../lib/exec/perfmonger-player_linux_386 ../lib/exec/perfmonger-summarizer_linux_386 ../lib/exec/perfmonger-plot-formatter_linux_386 ../lib/exec/perfmonger-recorder_linux_amd64 ../lib/exec/perfmonger-player_linux_amd64 ../lib/exec/perfmonger-summarizer_linux_amd64 ../lib/exec/perfmonger-plot-formatter_linux_amd64 ../lib/exec/perfmonger-recorder_darwin_amd64 ../lib/exec/perfmonger-player_darwin_amd64 ../lib/exec/perfmonger-summarizer_darwin_amd64 ../lib/exec/perfmonger-plot-formatter_darwin_amd64
|
51
|
+
build: ../lib/exec/perfmonger-recorder_linux_amd64 ../lib/exec/perfmonger-player_linux_amd64 ../lib/exec/perfmonger-viewer_linux_amd64 ../lib/exec/perfmonger-summarizer_linux_amd64 ../lib/exec/perfmonger-plot-formatter_linux_amd64 ../lib/exec/perfmonger-recorder_darwin_amd64 ../lib/exec/perfmonger-player_darwin_amd64 ../lib/exec/perfmonger-viewer_darwin_amd64 ../lib/exec/perfmonger-summarizer_darwin_amd64 ../lib/exec/perfmonger-plot-formatter_darwin_amd64
|
61
52
|
|
62
53
|
clean:
|
63
|
-
rm -f ../lib/exec/perfmonger-
|
54
|
+
rm -f ../lib/exec/perfmonger-recorder_linux_amd64 ../lib/exec/perfmonger-player_linux_amd64 ../lib/exec/perfmonger-viewer_linux_amd64 ../lib/exec/perfmonger-summarizer_linux_amd64 ../lib/exec/perfmonger-plot-formatter_linux_amd64 ../lib/exec/perfmonger-recorder_darwin_amd64 ../lib/exec/perfmonger-player_darwin_amd64 ../lib/exec/perfmonger-viewer_darwin_amd64 ../lib/exec/perfmonger-summarizer_darwin_amd64 ../lib/exec/perfmonger-plot-formatter_darwin_amd64
|
64
55
|
|
data/core/build.sh
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
4
|
-
cd $(dirname $($READLINK -f $0))
|
3
|
+
cd $(cd $(dirname $0); pwd)
|
5
4
|
|
6
5
|
if [[ $1 = "-" ]]; then
|
7
6
|
# do self build
|
@@ -28,12 +27,12 @@ if [[ $1 = "-" ]]; then
|
|
28
27
|
TARGET=("${os} ${arch}")
|
29
28
|
else
|
30
29
|
# cross build
|
31
|
-
TARGET=("linux
|
30
|
+
TARGET=("linux amd64" "darwin amd64")
|
32
31
|
fi
|
33
32
|
|
34
33
|
set -e
|
35
34
|
|
36
|
-
GO_DEPS=$(ls subsystem/*.go
|
35
|
+
GO_DEPS=$(ls subsystem/*.go utils.go)
|
37
36
|
|
38
37
|
makefile=`mktemp`
|
39
38
|
|
@@ -42,7 +41,6 @@ cat <<EOF > $makefile
|
|
42
41
|
# generated by build.sh
|
43
42
|
|
44
43
|
GO_DEPS := $(echo ${GO_DEPS})
|
45
|
-
GO_SRC := utils.go
|
46
44
|
|
47
45
|
.PHONY: all build clean
|
48
46
|
|
@@ -57,13 +55,13 @@ for idx in $(seq 0 $((${#TARGET[@]}-1))); do
|
|
57
55
|
export var_GOOS=$1
|
58
56
|
export var_GOARCH=$2
|
59
57
|
|
60
|
-
for subcmd in recorder player summarizer plot-formatter; do
|
58
|
+
for subcmd in recorder player viewer summarizer plot-formatter; do
|
61
59
|
TARGETS+=(../lib/exec/perfmonger-${subcmd}_${var_GOOS}_${var_GOARCH})
|
62
60
|
|
63
61
|
cat <<EOF >> $makefile
|
64
62
|
|
65
|
-
../lib/exec/perfmonger-${subcmd}_${var_GOOS}_${var_GOARCH}: perfmonger-${subcmd}.go \$(GO_DEPS)
|
66
|
-
go build -o
|
63
|
+
../lib/exec/perfmonger-${subcmd}_${var_GOOS}_${var_GOARCH}: cmd/perfmonger-${subcmd}/perfmonger-${subcmd}.go \$(GO_DEPS)
|
64
|
+
cd cmd/perfmonger-${subcmd} && go build -o ../../\$@ perfmonger-$subcmd.go
|
67
65
|
|
68
66
|
EOF
|
69
67
|
done
|