aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/rpcserver
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-07-24 12:08:49 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-07-24 14:39:45 +0000
commit49e6369fe732c0f81e5b03b36e345afbf3c79a15 (patch)
tree651e322e41a8084abd6f2c80e4f9b7ff50a1dfe9 /pkg/rpcserver
parent1f032c27c8158e44723253179928104813d45cdc (diff)
pkg/stat: rename package name to singular form
Go package names should generally be singular form: https://go.dev/blog/package-names https://rakyll.org/style-packages https://groups.google.com/g/golang-nuts/c/buBwLar1gNw
Diffstat (limited to 'pkg/rpcserver')
-rw-r--r--pkg/rpcserver/rpcserver.go40
-rw-r--r--pkg/rpcserver/runner.go14
2 files changed, 27 insertions, 27 deletions
diff --git a/pkg/rpcserver/rpcserver.go b/pkg/rpcserver/rpcserver.go
index 0b7d566bb..b371785d4 100644
--- a/pkg/rpcserver/rpcserver.go
+++ b/pkg/rpcserver/rpcserver.go
@@ -23,7 +23,7 @@ import (
"github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/pkg/mgrconfig"
"github.com/google/syzkaller/pkg/signal"
- "github.com/google/syzkaller/pkg/stats"
+ "github.com/google/syzkaller/pkg/stat"
"github.com/google/syzkaller/pkg/vminfo"
"github.com/google/syzkaller/prog"
"github.com/google/syzkaller/sys/targets"
@@ -58,8 +58,8 @@ type Manager interface {
type Server struct {
Port int
- StatExecs *stats.Val
- StatNumFuzzing *stats.Val
+ StatExecs *stat.Val
+ StatNumFuzzing *stat.Val
cfg *Config
mgr Manager
@@ -81,7 +81,7 @@ type Server struct {
runners map[string]*Runner
execSource queue.Source
triagedCorpus atomic.Bool
- statVMRestarts *stats.Val
+ statVMRestarts *stat.Val
*runnerStats
}
@@ -144,24 +144,24 @@ func newImpl(ctx context.Context, cfg *Config, mgr Manager) (*Server, error) {
baseSource: baseSource,
execSource: queue.Retry(baseSource),
- StatExecs: stats.New("exec total", "Total test program executions",
- stats.Console, stats.Rate{}, stats.Prometheus("syz_exec_total")),
- StatNumFuzzing: stats.New("fuzzing VMs", "Number of VMs that are currently fuzzing",
- stats.Console, stats.Link("/vms")),
- statVMRestarts: stats.New("vm restarts", "Total number of VM starts",
- stats.Rate{}, stats.NoGraph),
+ 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")),
+ statVMRestarts: stat.New("vm restarts", "Total number of VM starts",
+ stat.Rate{}, stat.NoGraph),
runnerStats: &runnerStats{
- statExecRetries: stats.New("exec retries",
+ statExecRetries: stat.New("exec retries",
"Number of times a test program was restarted because the first run failed",
- stats.Rate{}, stats.Graph("executor")),
- statExecutorRestarts: stats.New("executor restarts",
- "Number of times executor process was restarted", stats.Rate{}, stats.Graph("executor")),
- statExecBufferTooSmall: stats.New("buffer too small",
- "Program serialization overflowed exec buffer", stats.NoGraph),
- statNoExecRequests: stats.New("no exec requests",
- "Number of times fuzzer was stalled with no exec requests", stats.Rate{}),
- statNoExecDuration: stats.New("no exec duration",
- "Total duration fuzzer was stalled with no exec requests (ns/sec)", stats.Rate{}),
+ stat.Rate{}, stat.Graph("executor")),
+ statExecutorRestarts: stat.New("executor restarts",
+ "Number of times executor process was restarted", stat.Rate{}, stat.Graph("executor")),
+ statExecBufferTooSmall: stat.New("buffer too small",
+ "Program serialization overflowed exec buffer", stat.NoGraph),
+ 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{}),
},
}
serv.runnerStats.statExecs = serv.StatExecs
diff --git a/pkg/rpcserver/runner.go b/pkg/rpcserver/runner.go
index 21b270421..a0b519d20 100644
--- a/pkg/rpcserver/runner.go
+++ b/pkg/rpcserver/runner.go
@@ -18,7 +18,7 @@ import (
"github.com/google/syzkaller/pkg/fuzzer/queue"
"github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/pkg/osutil"
- "github.com/google/syzkaller/pkg/stats"
+ "github.com/google/syzkaller/pkg/stat"
"github.com/google/syzkaller/prog"
"github.com/google/syzkaller/sys/targets"
"github.com/google/syzkaller/vm/dispatcher"
@@ -54,12 +54,12 @@ type Runner struct {
}
type runnerStats struct {
- statExecs *stats.Val
- statExecRetries *stats.Val
- statExecutorRestarts *stats.Val
- statExecBufferTooSmall *stats.Val
- statNoExecRequests *stats.Val
- statNoExecDuration *stats.Val
+ statExecs *stat.Val
+ statExecRetries *stat.Val
+ statExecutorRestarts *stat.Val
+ statExecBufferTooSmall *stat.Val
+ statNoExecRequests *stat.Val
+ statNoExecDuration *stat.Val
}
type handshakeConfig struct {