Core

/bin/util/view-cpu-profile.sh (312 B)

 1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

## Starts a pprof server using the (previously-recorded) CPU profile at ./tmp/cpu.pprof

set -euo pipefail
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $dir/../..

echo "=== launching profiler for cpu.pprof ==="
go tool pprof -http=":8000" ./build/debug/{{{ .Exec }}} ./tmp/cpu.pprof