diff --git a/README.md b/README.md index c865a93a..ed45e25b 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![Test Actions Status](https://github.com/arl/statsviz/workflows/Tests-linux/badge.svg)](https://github.com/arl/statsviz/actions) [![Test Actions Status](https://github.com/arl/statsviz/workflows/Tests-others/badge.svg)](https://github.com/arl/statsviz/actions) + # Statsviz

@@ -33,6 +34,7 @@ Visualize real time plots of your Go program runtime metrics, including heap, ob - [Changelog](#changelog) - [License](#license) + ## Install Download the latest version: @@ -41,6 +43,7 @@ Download the latest version: go get github.com/arl/statsviz@latest ``` + ## Usage Register `Statsviz` HTTP handlers with your application `http.ServeMux`. @@ -50,15 +53,16 @@ mux := http.NewServeMux() statsviz.Register(mux) go func() { - log.Println(http.ListenAndServe("localhost:6060", mux)) + log.Println(http.ListenAndServe("localhost:8080", mux)) }() ``` -Open your browser at http://address:port/debug/statsviz +Open your browser at http://localhost:8080/debug/statsviz + ## Advanced Usage -For more control over to serve Statsviz UI from your program, you can call `statsviz.NewServer`. +For more control over how to serve Statsviz UI from your program, you can call `statsviz.NewServer`. ```go srv := statsviz.NewServer() @@ -72,6 +76,7 @@ srv.Ws() Checkout the [Examples](_example) directory. + ## How does that work? The call to `statsviz.Register` registers 2 HTTP handlers within the given `http.ServeMux`: @@ -82,6 +87,7 @@ The call to `statsviz.Register` registers 2 HTTP handlers within the given `http Data points are in a browser-side circular-buffer. + ## Documentation ### Go API