Skip to content

Commit

Permalink
Merge Nargs metrics between spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 committed Nov 11, 2020
1 parent 0b7ef7e commit 1495b3c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/metrics/fn_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1495b3c

Please sign in to comment.