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/corpus/corpus.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/corpus') diff --git a/pkg/corpus/corpus.go b/pkg/corpus/corpus.go index 4ad4f6f27..af5754273 100644 --- a/pkg/corpus/corpus.go +++ b/pkg/corpus/corpus.go @@ -40,11 +40,11 @@ func NewMonitoredCorpus(ctx context.Context, updates chan<- NewItemEvent) *Corpu updates: updates, ProgramsList: &ProgramsList{}, } - corpus.StatProgs = stats.Create("corpus", "Number of test programs in the corpus", stats.Console, + corpus.StatProgs = stats.New("corpus", "Number of test programs in the corpus", stats.Console, stats.Link("/corpus"), stats.Graph("corpus"), stats.LenOf(&corpus.progs, &corpus.mu)) - corpus.StatSignal = stats.Create("signal", "Fuzzing signal in the corpus", + corpus.StatSignal = stats.New("signal", "Fuzzing signal in the corpus", stats.LenOf(&corpus.signal, &corpus.mu)) - corpus.StatCover = stats.Create("coverage", "Source coverage in the corpus", stats.Console, + corpus.StatCover = stats.New("coverage", "Source coverage in the corpus", stats.Console, stats.Link("/cover"), stats.Prometheus("syz_corpus_cover"), stats.LenOf(&corpus.cover, &corpus.mu)) return corpus } -- cgit mrf-deployment