summaryrefslogtreecommitdiff
path: root/src/bin/obnam-benchmark.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/obnam-benchmark.rs')
-rw-r--r--src/bin/obnam-benchmark.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bin/obnam-benchmark.rs b/src/bin/obnam-benchmark.rs
index 76ab620..85ef3f9 100644
--- a/src/bin/obnam-benchmark.rs
+++ b/src/bin/obnam-benchmark.rs
@@ -1,7 +1,7 @@
use log::{debug, error, info};
use obnam_benchmark::result::Result;
use obnam_benchmark::specification::Specification;
-use obnam_benchmark::state::State;
+use obnam_benchmark::suite::Suite;
use std::fs::File;
use std::path::PathBuf;
use std::process::exit;
@@ -61,12 +61,10 @@ impl Run {
fn run(&self) -> anyhow::Result<()> {
info!("running benchmarks from {}", self.spec.display());
let spec = Specification::from_file(&self.spec)?;
- let mut state = State::new()?;
+ let mut suite = Suite::new()?;
let mut result = Result::default();
- for step in spec.steps() {
- if let Some(m) = state.execute(&step)? {
- result.push(m);
- }
+ for step in spec.steps().iter() {
+ result.push(suite.execute(step)?);
}
debug!("writing results to {}", self.output.display());
let output = File::create(&self.output)?;