Fixed basic benchmarking functionality

This commit is contained in:
Riley-Kilgore
2024-11-27 05:13:22 -08:00
committed by Riley
parent 8764d37d76
commit f55419e8fb
3 changed files with 21 additions and 20 deletions

View File

@@ -477,22 +477,11 @@ where
let tests = self.collect_tests(false, match_tests, exact_match, options.tracing)?;
if !tests.is_empty() {
self.event_listener.handle_event(Event::RunningTests);
self.event_listener.handle_event(Event::RunningBenchmarks);
}
let tests = self.run_benchmarks(tests, seed, property_max_success);
self.checks_count = if tests.is_empty() {
None
} else {
Some(tests.iter().fold(0, |acc, test| {
acc + match test {
TestResult::PropertyTestResult(r) => r.iterations,
_ => 1,
}
}))
};
let errors: Vec<Error> = tests
.iter()
.filter_map(|e| {