Add statsviz memory visualization tool

This commit is contained in:
Antoine 2020-12-09 00:07:35 +01:00
parent 3c779769e3
commit 472cd675be
Signed by: antoine
GPG Key ID: 098FB66FC0475E70
3 changed files with 13 additions and 0 deletions

1
go.mod
View File

@ -4,6 +4,7 @@ go 1.15
require (
fortio.org/dnsping v1.1.4 // indirect
github.com/arl/statsviz v0.2.1 // indirect
github.com/docker/docker-credential-helpers v0.6.3
)

2
go.sum
View File

@ -4,6 +4,8 @@ fortio.org/dnsping v1.1.4/go.mod h1:5y9DK7NFTU9s9w+FiqmwKxpl3eKyc4QI2aXdUiQUvoQ=
fortio.org/fortio v1.11.0 h1:p9lNbmYFat4ZcjSR3ojsCS2Wnw52FqGsRdG0sRxRx5Q=
fortio.org/fortio v1.11.0/go.mod h1:sbKl3MB8+XZTZ4HvLcBPUvFYPmMKG5zKsoCmgbo/YR8=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/arl/statsviz v0.2.1 h1:hjfBf5GLMd77tTALAThs6BWwGx4gZZoVeamahwu/ZKQ=
github.com/arl/statsviz v0.2.1/go.mod h1:Dg/DhcWPSzBVk70gVbZWcymzHDkYRhVpeScx5l+Zj7o=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=

View File

@ -4,6 +4,9 @@ import (
"fmt"
"log"
"net"
"net/http"
"github.com/arl/statsviz"
)
func produce(l *net.TCPListener, c chan<- net.Conn) {
@ -45,5 +48,12 @@ func main() {
if err != nil {
log.Fatalln(err)
}
statsviz.RegisterDefault()
go func() {
log.Println("start listening on port 6060 for statsviz")
log.Println(http.ListenAndServe(":6060", nil))
}()
produce(l, c)
}