Using profiling to debug memory leaks/CPU
0. Install graphviz by running sudo apt install graphviz
- use
--debugging
- The following command will request for a 5s CPU
profile and will launch a browser with an SVG file.
go tool pprof -web http://:6060/debug/pprof/profile?seconds=5
You can choose between:
CPU: profile?seconds=10
Memory: heap
Goroutines: goroutine
Goroutine blocking: block
Locks: mutex
Tracing: trace?seconds=5
GORACE="log_path=/PandoraPay/pandora-pay-go/report" go run -race main.go
This source code is released for research purposes only, with the intent of researching and studying a decentralized p2p network protocol.
PANDORAPAY IS AN OPEN SOURCE COMMUNITY DRIVEN RESEARCH PROJECT. THIS IS RESEARCH CODE PROVIDED TO YOU "AS IS" WITH NO WARRANTIES OF CORRECTNESS. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES. USE AT YOUR OWN RISK.
You may not use this source code for any illegal or unethical purpose; including activities which would give rise to criminal or civil liability.
Under no event shall the Licensor be responsible for the activities, or any misdeeds, conducted by the Licensee.