diff --git a/src/report.rs b/src/report.rs index 3c64c5b..74c5668 100644 --- a/src/report.rs +++ b/src/report.rs @@ -719,21 +719,30 @@ impl<'a> Display for BenchmarkCmp<'a> { Percentile::Max, ]; - writeln!(f)?; - writeln!(f, "{}", fmt_section_header("CYCLE LATENCY [ms]"))?; - if self.v2.is_some() { - writeln!(f, "{}", fmt_cmp_header(true))?; - } + for fn_name in self.v1.cycle_latency_by_fn.keys() { + writeln!(f)?; + writeln!( + f, + "{}", + fmt_section_header(format!("CYCLE LATENCY for {fn_name} [ms] ").as_str()) + )?; + if self.v2.is_some() { + writeln!(f, "{}", fmt_cmp_header(true))?; + } - for p in resp_time_percentiles.iter() { - let l = self - .line(p.name(), "", |s| { - let rt = s.request_latency.as_ref().map(|rt| rt.percentiles.get(*p)); - Quantity::from(rt).with_precision(3) - }) - .with_orientation(-1) - .with_significance(self.cmp_resp_time_percentile(*p)); - writeln!(f, "{l}")?; + for p in resp_time_percentiles.iter() { + let l = self + .line(p.name(), "", |s| { + let rt = s + .cycle_latency_by_fn + .get(fn_name) + .map(|l| l.percentiles.get(*p)); + Quantity::from(rt).with_precision(3) + }) + .with_orientation(-1) + .with_significance(self.cmp_resp_time_percentile(*p)); + writeln!(f, "{l}")?; + } } if self.v1.error_count > 0 {