From 81b407fe4e14e1e40fa060509157143e51ec1739 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 11 Apr 2025 14:08:10 +0200 Subject: pkg/manager: wait until corpus is triaged for diff fuzzing Track the right moment to start bug reproductions more exactly: 1) Either once 90% of the corpus is triaged (*). 2) Or once we are past 50% of the time dedicated for fuzzing. Whatever happens earlier. (*) The last percents are usually quite slow and they bring much less covered PCs that all the previous ones. --- pkg/fuzzer/fuzzer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/fuzzer') diff --git a/pkg/fuzzer/fuzzer.go b/pkg/fuzzer/fuzzer.go index 3e5f94fc3..17c5af47b 100644 --- a/pkg/fuzzer/fuzzer.go +++ b/pkg/fuzzer/fuzzer.go @@ -106,8 +106,12 @@ func newExecQueues(fuzzer *Fuzzer) execQueues { return ret } +func (fuzzer *Fuzzer) CandidatesToTriage() int { + return fuzzer.statCandidates.Val() + fuzzer.statJobsTriageCandidate.Val() +} + func (fuzzer *Fuzzer) CandidateTriageFinished() bool { - return fuzzer.statCandidates.Val()+fuzzer.statJobsTriageCandidate.Val() == 0 + return fuzzer.CandidatesToTriage() == 0 } func (fuzzer *Fuzzer) execute(executor queue.Executor, req *queue.Request) *queue.Result { -- cgit mrf-deployment