From 1495b3c4f789babb15966bcfa02fe45520dfaf6f Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Thu, 29 Oct 2020 21:33:06 +0100 Subject: [PATCH] Merge Nargs metrics between spaces --- src/metrics/fn_args.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/metrics/fn_args.rs b/src/metrics/fn_args.rs index 6e3440a49..f03893509 100644 --- a/src/metrics/fn_args.rs +++ b/src/metrics/fn_args.rs @@ -36,8 +36,10 @@ impl fmt::Display for Stats { } impl Stats { - #[doc(hidden)] - pub fn merge(&mut self, _other: &Stats) {} + /// Merges a second `NArgs` metric into the first one + pub fn merge(&mut self, other: &Stats) { + self.nargs += other.nargs; + } /// Returns the `NArgs` metric value pub fn nargs(&self) -> f64 {