summaryrefslogtreecommitdiff
path: root/cli/tools/bench/reporters.rs
diff options
context:
space:
mode:
authorArmaan Salam <38160090+ArmaanAS@users.noreply.github.com>2024-08-26 10:56:04 +0100
committerGitHub <noreply@github.com>2024-08-26 11:56:04 +0200
commit675539c7ab503e5a5bdef1d17678afb7b8dc352b (patch)
tree18a404e363c614aafbcd582dea74fed96ff568ef /cli/tools/bench/reporters.rs
parent1dad29aa044967db5f16568dc2591ba2976699b0 (diff)
fix(bench): Fix table column alignments and NO_COLOR=1 (#25190)
Fix table layout for `deno bench` command with and without color (`NO_COLOR=1`). Fixes issue in #25156
Diffstat (limited to 'cli/tools/bench/reporters.rs')
-rw-r--r--cli/tools/bench/reporters.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/tools/bench/reporters.rs b/cli/tools/bench/reporters.rs
index 3f244ed62..250655be7 100644
--- a/cli/tools/bench/reporters.rs
+++ b/cli/tools/bench/reporters.rs
@@ -152,11 +152,14 @@ impl BenchReporter for ConsoleReporter {
.compare_exchange(true, false, Ordering::SeqCst, Ordering::SeqCst)
.is_ok()
{
- println!("{}", colors::gray(format!("cpu: {}", mitata::cpu::name())));
+ println!(
+ "{}",
+ colors::gray(format!(" CPU | {}", mitata::cpu::name()))
+ );
println!(
"{}\n",
colors::gray(format!(
- "runtime: deno {} ({})",
+ "Runtime | Deno {} ({})",
crate::version::DENO_VERSION_INFO.deno,
env!("TARGET")
))
@@ -166,7 +169,7 @@ impl BenchReporter for ConsoleReporter {
}
println!(
- "{}\n{}\n{}",
+ "{}\n\n{}\n{}",
colors::gray(&plan.origin),
mitata::reporter::header(options),
mitata::reporter::br(options)