File tree Expand file tree Collapse file tree 4 files changed +51
-0
lines changed
Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ module example/default
2+
3+ go 1.23.0
4+
5+ toolchain go1.24.5
6+
7+ require github.com/arl/statsviz v0.7.1
8+
9+ require github.com/gorilla/websocket v1.5.3 // indirect
10+
11+ replace github.com/arl/statsviz => ../../
Original file line number Diff line number Diff line change 1+ github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg =
2+ github.com/gorilla/websocket v1.5.3 /go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE =
3+ github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ =
4+ github.com/rogpeppe/go-internal v1.14.1 /go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc =
5+ golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI =
6+ golang.org/x/sys v0.35.0 /go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k =
7+ golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg =
8+ golang.org/x/tools v0.36.0 /go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s =
Original file line number Diff line number Diff line change 1+ package main
2+
3+ import (
4+ "fmt"
5+ "log"
6+ "net/http"
7+
8+ "github.com/arl/statsviz"
9+ example "github.com/arl/statsviz/_example"
10+ )
11+
12+ func main () {
13+ // Force the GC to work to make the plots "move".
14+ go example .Work ()
15+
16+ // Register with the Server zero value.
17+ var ss statsviz.Server
18+ ss .Register (http .DefaultServeMux )
19+
20+ fmt .Println ("Point your browser to http://localhost:8079/debug/statsviz/" )
21+ log .Fatal (http .ListenAndServe (":8079" , nil ))
22+ }
Original file line number Diff line number Diff line change 1+ cp $STATSVIZ_ROOT/_example/default/main.go .
2+ cp $STATSVIZ_ROOT/_example/default/go.mod .
3+
4+ go mod edit -replace=github.com/arl/statsviz=$STATSVIZ_ROOT
5+ go mod edit -replace=github.com/arl/statsviz/_example=$STATSVIZ_ROOT/_example
6+ go mod tidy
7+
8+ go build main.go
9+ ! exec ./main &
10+ checkui http://localhost:8079/debug/statsviz/
You can’t perform that action at this time.
0 commit comments