package pprof
import "github.com/purpleidea/mgmt/util/pprof"
Package pprof is a simple wrapper around the pprof utility code which we use.
Index ¶
Functions ¶
func Run ¶
Run looks in a special environment var for the path to log pprof data to and if it finds it, it begins profiling. If it doesn't find a special environment var, it returns nil. If this is not able to start logging, then it errors. If it starts logging, this waits for an exit signal in a goroutine and returns nil. The magic env name is MGMT_PPROF_PATH. Example usage: MGMT_PPROF_PATH=~/pprof/"out.pprof" ./mgmt run lang examples/lang/hello0.mcl go tool pprof -no_browser -http :10000 ~/pprof/out.pprof
Source Files ¶
- Version
- v0.0.0-20250322185616-c50a578426f1 (latest)
- Published
- Mar 22, 2025
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 4 days ago –
Tools for package owners.