Skip to main content

Tracing and CPU Profiling

#825, aqua >= v1.10.0

You can set 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

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