Skip to content

Commit 2f7471d

Browse files
feat: remove existing pipedata file if there are any
1 parent cdfb56a commit 2f7471d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • src/run/runner/wall_time/perf

src/run/runner/wall_time/perf/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ impl PerfRunner {
9090
bench_cmd: &str,
9191
config: &Config,
9292
) -> anyhow::Result<ExitStatus> {
93+
// Clean up any existing perf data file from previous runs
94+
if Path::new(PERF_DATA_PATH).exists() {
95+
std::fs::remove_file(PERF_DATA_PATH).with_context(|| {
96+
format!("Failed to remove existing perf data file at {PERF_DATA_PATH}",)
97+
})?;
98+
}
99+
93100
let perf_fifo = PerfFifo::new()?;
94101
let runner_fifo = RunnerFifo::new()?;
95102

0 commit comments

Comments
 (0)