github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/bin/util/view-mem-profile.sh (about)

     1  #!/bin/bash
     2  # Content managed by Project Forge, see [projectforge.md] for details.
     3  
     4  ## Starts a pprof server using the (previously-recorded) heap dump at ./tmp/mem.pprof
     5  
     6  set -euo pipefail
     7  dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
     8  cd "$dir/../.."
     9  
    10  echo "=== launching profiler for mem.pprof ==="
    11  go tool pprof -http=":8000" ./build/debug/dbaudit ./tmp/mem.pprof