aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/fuzzer
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-07-22 11:55:47 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-07-25 13:12:57 +0000
commite02ef79b9ce5bc23eac00a1919746a36a308a4ae (patch)
treecc548e17f574b9d34ef0f8d04afef58ec65bd6b3 /pkg/fuzzer
parent32fcf98fda0484949d799e870d7ac9945c695932 (diff)
pkg/fuzzer/queue: move common fuzzing stats
These stats will be needed for snapshot mode that does not use rpcserver. Move them from pkg/rpcserver to pkg/fuzzer/queue.
Diffstat (limited to 'pkg/fuzzer')
-rw-r--r--pkg/fuzzer/queue/stats.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkg/fuzzer/queue/stats.go b/pkg/fuzzer/queue/stats.go
new file mode 100644
index 000000000..3097ca2d6
--- /dev/null
+++ b/pkg/fuzzer/queue/stats.go
@@ -0,0 +1,20 @@
+// Copyright 2024 syzkaller project authors. All rights reserved.
+// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+package queue
+
+import "github.com/google/syzkaller/pkg/stat"
+
+// Common stats related to fuzzing that are updated/read by different parts of the system.
+var (
+ StatExecs = stat.New("exec total", "Total test program executions",
+ stat.Console, stat.Rate{}, stat.Prometheus("syz_exec_total"))
+ StatNumFuzzing = stat.New("fuzzing VMs", "Number of VMs that are currently fuzzing",
+ stat.Console, stat.Link("/vms"))
+ StatNoExecRequests = stat.New("no exec requests",
+ "Number of times fuzzer was stalled with no exec requests", stat.Rate{})
+ StatNoExecDuration = stat.New("no exec duration",
+ "Total duration fuzzer was stalled with no exec requests (ns/sec)", stat.Rate{})
+ StatExecBufferTooSmall = stat.New("buffer too small",
+ "Program serialization overflowed exec buffer", stat.NoGraph)
+)