aboutsummaryrefslogtreecommitdiffstats
path: root/syz-manager/stats.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-04-10 17:24:01 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-04-10 15:34:42 +0000
commit5b968ccf1481a8bae7fce49cca01cf3597da4be8 (patch)
tree1f339f51d54e4ca960c31b6d262e2912ade06468 /syz-manager/stats.go
parent6e189cf48871220fff5a087cc06b6682e052da3c (diff)
syz-manager: collect avg instance create time
We will also use it to determine when we are ready to schedule programs that are very likely to crash instances.
Diffstat (limited to 'syz-manager/stats.go')
-rw-r--r--syz-manager/stats.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/syz-manager/stats.go b/syz-manager/stats.go
index 7cb67d5ca..1169f4125 100644
--- a/syz-manager/stats.go
+++ b/syz-manager/stats.go
@@ -20,6 +20,7 @@ type Stats struct {
statSuppressed *stats.Val
statUptime *stats.Val
statFuzzingTime *stats.Val
+ statAvgBootTime *stats.Val
}
func (mgr *Manager) initStats() {
@@ -48,6 +49,14 @@ func (mgr *Manager) initStats() {
}, func(v int, period time.Duration) string {
return fmt.Sprintf("%v sec", v)
})
+ mgr.statAvgBootTime = stats.Create("instance restart", "Average VM restart time (sec)",
+ stats.NoGraph,
+ func() int {
+ return int(mgr.bootTime.Value().Seconds())
+ },
+ func(v int, _ time.Duration) string {
+ return fmt.Sprintf("%v sec", v)
+ })
stats.Create("heap", "Process heap size (bytes)", stats.Graph("memory"),
func() int {