Skip to content

Commit 075932b

Browse files
committed
analyse: skip own output files to eliminate warning on rerun
1 parent ea9fea6 commit 075932b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/analyse.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ fn analyse_sample(
4444
Engine::Servo { .. } => {
4545
for entry in std::fs::read_dir(&sample_dir)? {
4646
let path = entry?.path();
47+
// Skip our own output files `summaries.*`.
48+
if path.file_stem() == Some(OsStr::new("summaries")) {
49+
continue;
50+
}
4751
// Filter to `manifest*.json`.
4852
if path.extension() == Some(OsStr::new("json")) {
4953
args.push(path.to_str().ok_or_eyre("Unsupported path")?.to_owned());
@@ -79,13 +83,12 @@ fn analyse_sample(
7983
for result in traceconv_results {
8084
result?;
8185
}
82-
}
83-
}
84-
for entry in std::fs::read_dir(&sample_dir)? {
85-
let path = entry?.path();
86-
match engine.engine {
87-
Engine::Servo { .. } => {}
88-
Engine::Chromium { .. } => {
86+
for entry in std::fs::read_dir(&sample_dir)? {
87+
let path = entry?.path();
88+
// Skip our own output files `summaries.*`.
89+
if path.file_stem() == Some(OsStr::new("summaries")) {
90+
continue;
91+
}
8992
// Filter to `chrome*.json`.
9093
if path.extension() == Some(OsStr::new("json")) {
9194
args.push(path.to_str().ok_or_eyre("Unsupported path")?.to_owned());

0 commit comments

Comments
 (0)