Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rubyist/msdumper
Dump and graph MemStats for your Go program
https://github.com/rubyist/msdumper
Last synced: 24 days 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 (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-08T20:59:49.000Z (almost 10 years ago)
- Last Synced: 2023-04-10T09:21:40.816Z (over 1 year 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.
![graph](https://cloud.githubusercontent.com/assets/143/5670568/211ad202-974f-11e4-9c47-0920ab33c42f.png)
You can specify an output file and graph title:
```
$ msgraph -h
Usage of msgraph:
-o="graph.png": output file
-t="MemStats": graph titlep
```