From 1f032c27c8158e44723253179928104813d45cdc Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 24 Jul 2024 11:32:41 +0200 Subject: 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). --- pkg/rpcserver/rpcserver.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'pkg/rpcserver') 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{}), }, } -- cgit mrf-deployment