github aquaproj/aqua v1.10.0

latest releases: v2.27.3, v2.27.2, v2.27.1...
23 months ago

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

#825

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

image

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

image

Support installing Go tools by go install command

#823 #826

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. If path is not set but repo_owner and repo_name are set, the package path is github.com/<repo_owner>/<repo_name>
  • name: The package name. If name is not set but repo_owner and repo_name are set, the package name is <repo_owner>/<repo_name>. If name, repo_owner, and repo_name aren't set, path is used as the package name

Others

#828 #831 Refactoring

Don't miss a new aqua release

NewReleases is sending notifications on new releases.