Skip to content

Commit 5c44a4b

Browse files
committed
pkg/rpcserver: move executor restart to named stats
This will let us see executor restart statistics per VM pool (relevant for diff fuzzing).
1 parent 1804e95 commit 5c44a4b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pkg/rpcserver/rpcserver.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ type server struct {
111111
}
112112

113113
type Stats struct {
114-
StatExecs *stat.Val
115-
StatNumFuzzing *stat.Val
116-
StatVMRestarts *stat.Val
117-
StatModules *stat.Val
114+
StatExecs *stat.Val
115+
StatNumFuzzing *stat.Val
116+
StatVMRestarts *stat.Val
117+
StatModules *stat.Val
118+
StatExecutorRestarts *stat.Val
118119
}
119120

120121
func NewStats() Stats {
@@ -139,6 +140,8 @@ func NewNamedStats(name string) Stats {
139140
stat.Rate{}, stat.NoGraph),
140141
StatModules: stat.New("modules"+suffix, "Number of loaded kernel modules",
141142
stat.NoGraph, stat.Link("/modules"+linkSuffix)),
143+
StatExecutorRestarts: stat.New("executor restarts",
144+
"Number of times executor process was restarted", stat.Rate{}, stat.Graph("executor")),
142145
}
143146
}
144147

@@ -209,8 +212,7 @@ func newImpl(cfg *Config, mgr Manager) *server {
209212
statExecRetries: stat.New("exec retries",
210213
"Number of times a test program was restarted because the first run failed",
211214
stat.Rate{}, stat.Graph("executor")),
212-
statExecutorRestarts: stat.New("executor restarts",
213-
"Number of times executor process was restarted", stat.Rate{}, stat.Graph("executor")),
215+
statExecutorRestarts: cfg.Stats.StatExecutorRestarts,
214216
statExecBufferTooSmall: queue.StatExecBufferTooSmall,
215217
statExecs: cfg.Stats.StatExecs,
216218
statNoExecRequests: queue.StatNoExecRequests,

0 commit comments

Comments
 (0)