summaryrefslogtreecommitdiff
path: root/cli/tools
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools')
-rw-r--r--cli/tools/bench.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/tools/bench.rs b/cli/tools/bench.rs
index f926cec5a..fd686a938 100644
--- a/cli/tools/bench.rs
+++ b/cli/tools/bench.rs
@@ -95,6 +95,7 @@ pub struct BenchDescription {
pub group: Option<String>,
pub ignore: bool,
pub only: bool,
+ pub warmup: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -194,6 +195,10 @@ impl BenchReporter for JsonReporter {
fn report_output(&mut self, _output: &str) {}
fn report_result(&mut self, desc: &BenchDescription, result: &BenchResult) {
+ if desc.warmup {
+ return;
+ }
+
let maybe_bench = self.0.benches.iter_mut().find(|bench| {
bench.origin == desc.origin
&& bench.group == desc.group
@@ -326,6 +331,10 @@ impl BenchReporter for ConsoleReporter {
}
fn report_result(&mut self, desc: &BenchDescription, result: &BenchResult) {
+ if desc.warmup {
+ return;
+ }
+
let options = self.options.as_ref().unwrap();
match result {