# statsviz **Repository Path**: mirrors_smallnest/statsviz ## Basic Information - **Project Name**: statsviz - **Description**: Instant live visualization of your Go application runtime statistics (GC, MemStats, etc.) in the browser :rocket: - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-23 - **Last Updated**: 2026-05-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/arl/statsviz) [![Go Report Card](https://goreportcard.com/badge/github.com/arl/statsviz)](https://goreportcard.com/report/github.com/arl/statsviz) Statsviz ======== Instant live visualization of your Go application runtime statistics (GC, MemStats, etc.). - Import `import "github.com/arl/statsviz"` - Register statsviz HTTP handlers - Start your program - Open your browser at `http://host:port/debug/statsviz` - Enjoy... Usage ----- go get -u github.com/arl/statsviz Either `Register` statsviz HTTP handlers with the [http.ServeMux](https://pkg.go.dev/net/http?tab=doc#ServeMux) you're using (preferred method): ```go mux := http.NewServeMux() statsviz.Register(mux) ``` Or register them with the `http.DefaultServeMux`: ```go statsviz.RegisterDefault() ``` If your application is not already running an HTTP server, you need to start one. Add `"net/http"` and `"log"` to your imports and the following code to your `main` function: ```go go func() { log.Println(http.ListenAndServe("localhost:6060", nil)) }() ``` The handled path is `/debug/statsviz/`. Then open your browser at http://localhost:6060/debug/statsviz/ Examples -------- Using `http.DefaultServeMux`: - [_example/default.go](./_example/default.go) Using your own `http.ServeMux`: - [_example/mux.go](./_example/mux.go) Using [gorilla/mux](https://github.com/gorilla/mux) Router: - [_example/gorilla/mux.go](./_example/gorilla/mux.go) Plots ----- On the plots where it matters, garbage collections are shown as vertical lines. ### Heap Heap plot image ### MSpans / MCaches MSpan/MCache plot image ### Size classes heatmap Size classes heatmap image ### Objects Objects plot image ### Goroutines Goroutines plot image ### GC/CPU fraction GC/CPU fraction plot image Contributing ------------ Pull-requests are welcome! More details in [CONTRIBUTING.md](CONTRIBUTING.md) License ------- - [MIT License](LICENSE)