Skip to content

Commit 6006c96

Browse files
committed
Get rid of incremental progress bar when compiling runtime benchmarks
It was causing issues with log printing.
1 parent 0eecb78 commit 6006c96

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

collector/src/runtime/benchmark.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use core::option::Option;
66
use core::option::Option::Some;
77
use core::result::Result::Ok;
88
use std::collections::HashMap;
9-
use std::io::{BufReader, Write};
9+
use std::io::BufReader;
1010
use std::path::{Path, PathBuf};
1111
use std::process::{Child, Command, Stdio};
1212
use tempfile::TempDir;
@@ -114,14 +114,11 @@ pub fn create_runtime_benchmark_suite(
114114

115115
let mut groups = Vec::new();
116116
for (index, benchmark_crate) in benchmark_crates.into_iter().enumerate() {
117-
// Show incremental progress
118-
print!(
119-
"\r{}\rCompiling `{}` ({}/{group_count})",
120-
" ".repeat(80),
121-
benchmark_crate.name,
117+
println!(
118+
"Compiling {:<22} ({}/{group_count})",
119+
format!("`{}`", benchmark_crate.name),
122120
index + 1
123121
);
124-
std::io::stdout().flush().unwrap();
125122

126123
let target_dir = temp_dir.as_ref().map(|d| d.path());
127124

@@ -135,7 +132,6 @@ pub fn create_runtime_benchmark_suite(
135132
})?;
136133
groups.push(group);
137134
}
138-
println!();
139135

140136
groups.sort_unstable_by(|a, b| a.binary.cmp(&b.binary));
141137
log::debug!("Found binaries: {:?}", groups);

0 commit comments

Comments
 (0)