agent: add the off-heap BuckHashSys mstat

All off-heap metrics are returned by MemStats except this one so let's
add it to have a better global picture of off-heap memory use.

Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
This commit is contained in:
Mahe Tardy
2024-11-05 12:44:43 +01:00
committed by Tobias Klauser
parent 51efca2c3e
commit 0463c1d363
+1
View File
@@ -233,6 +233,7 @@ func handle(conn io.ReadWriter, msg []byte) error {
fmt.Fprintf(conn, "mspan-sys: %v\n", formatBytes(s.MSpanSys))
fmt.Fprintf(conn, "mcache-in-use: %v\n", formatBytes(s.MCacheInuse))
fmt.Fprintf(conn, "mcache-sys: %v\n", formatBytes(s.MCacheSys))
fmt.Fprintf(conn, "buck-hash-sys: %v\n", formatBytes(s.BuckHashSys))
fmt.Fprintf(conn, "other-sys: %v\n", formatBytes(s.OtherSys))
fmt.Fprintf(conn, "gc-sys: %v\n", formatBytes(s.GCSys))
fmt.Fprintf(conn, "next-gc: when heap-alloc >= %v\n", formatBytes(s.NextGC))