Skip to content

Commit

Permalink
Minor report formatting adjustments
Browse files Browse the repository at this point in the history
(cherry picked from commit eee1393)
  • Loading branch information
pkolaczk authored and vponomaryov committed Oct 29, 2024
1 parent fd4772f commit a4f3435
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,16 +490,22 @@ impl<'a> Display for RunConfigCmp<'a> {
self.line("Cluster", "", |conf| {
OptionDisplay(conf.cluster_name.clone())
}),
self.line("Datacenter", "", |conf| {
conf.connection.datacenter.clone().unwrap_or_default()
}),
self.line("Cass. version", "", |conf| {
OptionDisplay(conf.cass_version.clone())
}),
self.line("Tags", "", |conf| conf.tags.iter().join(", ")),
self.line("Workload", "", |conf| {
conf.workload
.file_name()
.map(|n| n.to_string_lossy().to_string())
.unwrap_or_default()
}),
self.line("Consistency", "", |conf| {
conf.connection.consistency.scylla_consistency().to_string()
}),
self.line("Tags", "", |conf| conf.tags.iter().join(", ")),
];

for l in lines {
Expand Down Expand Up @@ -532,12 +538,6 @@ impl<'a> Display for RunConfigCmp<'a> {
}

let lines: Vec<Box<dyn Display>> = vec![
self.line("Datacenter", "", |conf| {
conf.connection.datacenter.clone().unwrap_or_default()
}),
self.line("Consistency", "", |conf| {
conf.connection.consistency.scylla_consistency().to_string()
}),
self.line("Threads", "", |conf| Quantity::from(conf.threads)),
self.line("Connections", "", |conf| {
Quantity::from(conf.connection.count)
Expand Down Expand Up @@ -588,8 +588,8 @@ impl<'a> Display for RunConfigCmp<'a> {

pub fn print_log_header() {
println!("{}", fmt_section_header("LOG"));
println!("{}", style(" Time Cycles Errors Throughput ───────────────────────────── Latency [ms] ────────────────────────────").yellow().bold().for_stdout());
println!("{}", style(" [s] [op] [op] [op/s] Min 50 75 90 95 99 Max").yellow().for_stdout());
println!("{}", style(" Time Cycles Errors Thrpt. ────────────────────────────────── Latency [ms/op] ──────────────────────────────").yellow().bold().for_stdout());
println!("{}", style(" [s] [op] [op] [op/s] Min 50 75 90 95 99 99.9 Max").yellow().for_stdout());
}

impl Display for Sample {
Expand All @@ -616,7 +616,7 @@ impl Display for Sample {
}
write!(
f,
"{:8.3} {:11.0} {:11.0} {:11.0} {:9.3} {:9.3} {:9.3} {:9.3} {:9.3} {:9.3} {:9.3}",
"{:8.3} {:9.0} {:9.0} {:9.0} {:9.3} {:9.3} {:9.3} {:9.3} {:9.3} {:9.3} {:9.3} {:9.3}",
self.time_s + self.duration_s,
self.cycle_count,
self.cycle_error_count,
Expand All @@ -627,6 +627,7 @@ impl Display for Sample {
self.cycle_time_percentiles[Percentile::P90 as usize],
self.cycle_time_percentiles[Percentile::P95 as usize],
self.cycle_time_percentiles[Percentile::P99 as usize],
self.cycle_time_percentiles[Percentile::P99_9 as usize],
self.cycle_time_percentiles[Percentile::Max as usize]
)
}
Expand Down

0 comments on commit a4f3435

Please sign in to comment.