github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/pkg/fuzzer/stats.go (about)

     1  // Copyright 2024 syzkaller project authors. All rights reserved.
     2  // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  package fuzzer
     5  
     6  import "github.com/google/syzkaller/pkg/stats"
     7  
     8  type Stats struct {
     9  	StatCandidates    *stats.Val
    10  	statNewInputs     *stats.Val
    11  	statJobs          *stats.Val
    12  	statJobsTriage    *stats.Val
    13  	statJobsSmash     *stats.Val
    14  	statJobsHints     *stats.Val
    15  	statExecTime      *stats.Val
    16  	statExecGenerate  *stats.Val
    17  	statExecFuzz      *stats.Val
    18  	statExecCandidate *stats.Val
    19  	statExecTriage    *stats.Val
    20  	statExecMinimize  *stats.Val
    21  	statExecSmash     *stats.Val
    22  	statExecHint      *stats.Val
    23  	statExecSeed      *stats.Val
    24  	statExecCollide   *stats.Val
    25  }
    26  
    27  func newStats() Stats {
    28  	return Stats{
    29  		StatCandidates: stats.Create("candidates", "Number of candidate programs in triage queue",
    30  			stats.Console, stats.Graph("corpus")),
    31  		statNewInputs: stats.Create("new inputs", "Potential untriaged corpus candidates",
    32  			stats.Graph("corpus")),
    33  		statJobs:       stats.Create("fuzzer jobs", "Total running fuzzer jobs", stats.NoGraph),
    34  		statJobsTriage: stats.Create("triage jobs", "Running triage jobs", stats.StackedGraph("jobs")),
    35  		statJobsSmash:  stats.Create("smash jobs", "Running smash jobs", stats.StackedGraph("jobs")),
    36  		statJobsHints:  stats.Create("hints jobs", "Running hints jobs", stats.StackedGraph("jobs")),
    37  		statExecTime:   stats.Create("prog exec time", "Test program execution time (ms)", stats.Distribution{}),
    38  		statExecGenerate: stats.Create("exec gen", "Executions of generated programs", stats.Rate{},
    39  			stats.StackedGraph("exec")),
    40  		statExecFuzz: stats.Create("exec fuzz", "Executions of mutated programs",
    41  			stats.Rate{}, stats.StackedGraph("exec")),
    42  		statExecCandidate: stats.Create("exec candidate", "Executions of candidate programs",
    43  			stats.Rate{}, stats.StackedGraph("exec")),
    44  		statExecTriage: stats.Create("exec triage", "Executions of corpus triage programs",
    45  			stats.Rate{}, stats.StackedGraph("exec")),
    46  		statExecMinimize: stats.Create("exec minimize", "Executions of programs during minimization",
    47  			stats.Rate{}, stats.StackedGraph("exec")),
    48  		statExecSmash: stats.Create("exec smash", "Executions of smashed programs",
    49  			stats.Rate{}, stats.StackedGraph("exec")),
    50  		statExecHint: stats.Create("exec hints", "Executions of programs generated using hints",
    51  			stats.Rate{}, stats.StackedGraph("exec")),
    52  		statExecSeed: stats.Create("exec seeds", "Executions of programs for hints extraction",
    53  			stats.Rate{}, stats.StackedGraph("exec")),
    54  		statExecCollide: stats.Create("exec collide", "Executions of programs in collide mode",
    55  			stats.Rate{}, stats.StackedGraph("exec")),
    56  	}
    57  }