diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-07-24 11:32:41 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-07-24 14:39:45 +0000 |
| commit | 1f032c27c8158e44723253179928104813d45cdc (patch) | |
| tree | 80845c1da6b2c62ccec9118ab68f5d75766f8485 /pkg/rpcserver | |
| parent | bea049d0b7d151ad71617c10191fbd954decb300 (diff) | |
pkg/stats: rename Create to New
New is more idiomatic name and is shorter
(lines where stats.Create is used are usually long,
so making them a bit shorter is good).
Diffstat (limited to 'pkg/rpcserver')
| -rw-r--r-- | pkg/rpcserver/rpcserver.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/rpcserver/rpcserver.go b/pkg/rpcserver/rpcserver.go index 0d50695f6..0b7d566bb 100644 --- a/pkg/rpcserver/rpcserver.go +++ b/pkg/rpcserver/rpcserver.go @@ -144,23 +144,23 @@ func newImpl(ctx context.Context, cfg *Config, mgr Manager) (*Server, error) { baseSource: baseSource, execSource: queue.Retry(baseSource), - StatExecs: stats.Create("exec total", "Total test program executions", + StatExecs: stats.New("exec total", "Total test program executions", stats.Console, stats.Rate{}, stats.Prometheus("syz_exec_total")), - StatNumFuzzing: stats.Create("fuzzing VMs", "Number of VMs that are currently fuzzing", + StatNumFuzzing: stats.New("fuzzing VMs", "Number of VMs that are currently fuzzing", stats.Console, stats.Link("/vms")), - statVMRestarts: stats.Create("vm restarts", "Total number of VM starts", + statVMRestarts: stats.New("vm restarts", "Total number of VM starts", stats.Rate{}, stats.NoGraph), runnerStats: &runnerStats{ - statExecRetries: stats.Create("exec retries", + statExecRetries: stats.New("exec retries", "Number of times a test program was restarted because the first run failed", stats.Rate{}, stats.Graph("executor")), - statExecutorRestarts: stats.Create("executor restarts", + statExecutorRestarts: stats.New("executor restarts", "Number of times executor process was restarted", stats.Rate{}, stats.Graph("executor")), - statExecBufferTooSmall: stats.Create("buffer too small", + statExecBufferTooSmall: stats.New("buffer too small", "Program serialization overflowed exec buffer", stats.NoGraph), - statNoExecRequests: stats.Create("no exec requests", + statNoExecRequests: stats.New("no exec requests", "Number of times fuzzer was stalled with no exec requests", stats.Rate{}), - statNoExecDuration: stats.Create("no exec duration", + statNoExecDuration: stats.New("no exec duration", "Total duration fuzzer was stalled with no exec requests (ns/sec)", stats.Rate{}), }, } |
