Skip to content

Commit 23fcc40

Browse files
committed
Make load aggregator report easier to use
1 parent cc3b1ea commit 23fcc40

File tree

1 file changed

+13
-4
lines changed
  • mithril-test-lab/mithril-end-to-end/src/stress_test

1 file changed

+13
-4
lines changed

mithril-test-lab/mithril-end-to-end/src/stress_test/entities.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ impl Reporter {
157157
pub fn stop(&mut self) {
158158
match &self.current_timing {
159159
Some((phase, instant)) => {
160+
let phase = if self.number_of_clients == 0 {
161+
format!("{phase} - without clients")
162+
} else {
163+
format!("{phase} - with clients")
164+
};
160165
let timing = Timing {
161166
phase: phase.clone(),
162167
duration: instant.elapsed(),
@@ -170,11 +175,15 @@ impl Reporter {
170175
}
171176

172177
pub fn print_report(&self) {
173-
println!("number_of_signers\t{}", self.number_of_signers);
174-
println!("number_of_clients\t{}", self.number_of_clients);
175-
println!("phase\tduration/ms");
178+
println!("signers\tclients\tphase\tduration/ms");
176179
for t in &self.timings {
177-
println!("{}\t{}", t.phase, t.duration.as_millis());
180+
println!(
181+
"{}\t{}\t{}\t{}",
182+
self.number_of_signers,
183+
self.number_of_clients,
184+
t.phase,
185+
t.duration.as_millis()
186+
);
178187
}
179188
}
180189
}

0 commit comments

Comments
 (0)