https://github.com/rubyist/msdumper
Dump and graph MemStats for your Go program
https://github.com/rubyist/msdumper
Last synced: 3 months ago
JSON representation
Dump and graph MemStats for your Go program
- Host: GitHub
- URL: https://github.com/rubyist/msdumper
- Owner: rubyist
- License: mit
- Created: 2015-01-08T20:59:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-08T20:59:49.000Z (over 10 years ago)
- Last Synced: 2025-01-31T14:21:57.272Z (5 months ago)
- Language: Go
- Size: 97.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## msdumper
msdumper just periodically dumps `runtime.MemStats` to a file.
`go get github.com/rubyist/msdumper`
```go
import "github.com/rubyist/msdumper"if err := msdumper.Start("memstats.dat", time.Second); err != nil {
log.Fatal(err)
}// Some time later, if you like ...
msdumper.Stop()
```## msgraph
msgraph will use gnuplot to generate a graph from the data file.
`go install github.com/rubyist/msdumper/msgraph`
```
$ msgraph memstats.dat
```This will output `graph.png` by default.

You can specify an output file and graph title:
```
$ msgraph -h
Usage of msgraph:
-o="graph.png": output file
-t="MemStats": graph titlep
```