Skip to content

Commit

Permalink
Automatically create dump directories
Browse files Browse the repository at this point in the history
  • Loading branch information
bazhenov committed Jan 25, 2024
1 parent 842805f commit 04a292a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tango-bench/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ mod commands {
RandomSampler, RunResult, Sampler, SamplerType,
};
use std::{
fs::File,
fs::{self, File},
io::{self, BufWriter, Write as _},
mem,
path::Path,
Expand Down Expand Up @@ -435,6 +435,9 @@ mod commands {
.ok_or(Error::NoMeasurements)?;

if let Some(path) = &self.samples_dump_path {
if !path.exists() {
fs::create_dir_all(path)?;
}
let file_name = format!("{}.csv", test_name.replace('/', "-"));
let file_path = path.join(file_name);
let values = a_func
Expand Down

0 comments on commit 04a292a

Please sign in to comment.