Skip to content

Commit

Permalink
Reporting skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bazhenov committed Jan 25, 2024
1 parent 81c4f77 commit 7785853
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tango-bench/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use rand::{rngs::SmallRng, SeedableRng};
use std::{
env::args,
fmt::Display,
io::{stderr, Write},
num::NonZeroUsize,
path::PathBuf,
process::ExitCode,
Expand Down Expand Up @@ -83,6 +84,10 @@ enum BenchmarkMode {
#[arg(short = 'o', long = "filter-outliers")]
filter_outliers: bool,

/// Quiet mode
#[arg(short = 'q')]
quiet: bool,

#[arg(short = 'v', long = "verbose", default_value_t = false)]
verbose: bool,
},
Expand Down Expand Up @@ -156,6 +161,7 @@ pub fn run(mut settings: MeasurementSettings) -> Result<ExitCode> {
sampler,
cache_firewall,
yield_before_sample,
quiet,
} => {
let mut reporter: Box<dyn Reporter> = if verbose {
Box::<VerboseReporter>::default()
Expand Down Expand Up @@ -198,6 +204,9 @@ pub fn run(mut settings: MeasurementSettings) -> Result<ExitCode> {
}

if spi_lib.lookup(&func.name).is_none() {
if !quiet {
writeln!(stderr(), "{} skipped...", &func.name)?;
}
continue;
}

Expand Down Expand Up @@ -268,7 +277,7 @@ mod commands {
};
use std::{
fs::{self, File},
io::{self, BufWriter, Write as _},
io::{self, BufWriter},
mem,
path::Path,
time::Instant,
Expand Down

0 comments on commit 7785853

Please sign in to comment.