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/corpus | |
| 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/corpus')
| -rw-r--r-- | pkg/corpus/corpus.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 } |
