Pull Requests | Issues | v1.9.0...v1.10.0
Features
#825 Add global command line options -trace
and -cpu-profile
for tracing and CPU Profiling
#823 #826 Support installing Go tools by go install
command
Add global command line options -trace
and -cpu-profile
for tracing and CPU Profiling
This is useful for the performance tuning.
The following Go's standard libraries are used.
How to use
All sub commands except for help
and version
commands support this option.
Tracing with runtime/trace
$ aqua -trace trace.out exec -- gh version # a file trace.out is created
$ go tool trace trace.out
2022/06/01 11:18:47 Parsing trace...
2022/06/01 11:18:47 Splitting trace...
2022/06/01 11:18:47 Opening browser. Trace viewer is listening on http://127.0.0.1:58380
CPU Profiling with runtime/pprof
$ aqua -cpu-profile pprof.out exec -- gh version # a file pprof.out is created
$ go tool pprof -http=":8000" "$(which aqua)" pprof.out
Support installing Go tools by go install
command
The new package type go_install
has been added.
The package is installed by go install
command.
So the command go
is required.
When aqua runs go install
, aqua sets the environment variable GOBIN
.
aqua is a CLI Version Manager, you have to specify the version. You can't specify latest
.
e.g. golang.org/x/perf/cmd/benchstat
registry.yaml
packages:
- type: go_install
path: golang.org/x/perf/cmd/benchstat
description: Benchstat computes and compares statistics about benchmarks
aqua.yaml
registries:
- name: local
type: local
path: registry.yaml
packages:
- name: golang.org/x/perf/cmd/benchstat
registry: local
version: 84e58bfe0a7e5416369e236afa007d5d9c58a0fa
$ aqua i
INFO[0000] create a symbolic link aqua_version= env=darwin/arm64 link_file=/Users/shunsukesuzuki/.local/share/aquaproj-aqua/bin/benchstat new=aqua-proxy package_name=golang.org/x/perf/cmd/benchstat package_version=84e58bfe0a7e5416369e236afa007d5d9c58a0fa program=aqua registry=local
INFO[0000] Installing a Go tool aqua_version= env=darwin/arm64 go_package_path=golang.org/x/perf/cmd/benchstat@84e58bfe0a7e5416369e236afa007d5d9c58a0fa gobin=/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/go_install/golang.org/x/perf/cmd/benchstat/84e58bfe0a7e5416369e236afa007d5d9c58a0fa/bin package_name=golang.org/x/perf/cmd/benchstat package_version=84e58bfe0a7e5416369e236afa007d5d9c58a0fa program=aqua registry=local
go: downloading golang.org/x/perf v0.0.0-20220411212318-84e58bfe0a7e
$ aqua which benchstat
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/go_install/golang.org/x/perf/cmd/benchstat/84e58bfe0a7e5416369e236afa007d5d9c58a0fa/bin/github-compare
path
: Go package path. Ifpath
is not set butrepo_owner
andrepo_name
are set, the package path isgithub.com/<repo_owner>/<repo_name>
name
: The package name. Ifname
is not set butrepo_owner
andrepo_name
are set, the package name is<repo_owner>/<repo_name>
. Ifname
,repo_owner
, andrepo_name
aren't set,path
is used as the package name