From e5f6d2961cef719e286f3f5f7f4ab868fc4ba7cd Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 5 Jul 2024 11:37:34 +0200 Subject: pkg/image: provide stats about images --- syz-manager/stats.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'syz-manager') diff --git a/syz-manager/stats.go b/syz-manager/stats.go index 0f49c33db..cffa7e4c1 100644 --- a/syz-manager/stats.go +++ b/syz-manager/stats.go @@ -8,6 +8,7 @@ import ( "runtime" "time" + "github.com/google/syzkaller/pkg/image" "github.com/google/syzkaller/pkg/stats" ) @@ -68,5 +69,15 @@ func (mgr *Manager) initStats() { }, func(v int, period time.Duration) string { return fmt.Sprintf("%v MB", v>>20) }) + stats.Create("images memory", "Uncompressed images memory (bytes)", stats.Graph("memory"), + func() int { + return int(image.StatMemory.Load()) + }, func(v int, period time.Duration) string { + return fmt.Sprintf("%v MB", v>>20) + }) + stats.Create("uncompressed images", "Total number of uncompressed images in memory", + func() int { + return int(image.StatImages.Load()) + }) mgr.statCoverFiltered = stats.Create("filtered coverage", "", stats.NoGraph) } -- cgit mrf-deployment