Skip to content

Commit

Permalink
Add reset method
Browse files Browse the repository at this point in the history
  • Loading branch information
mchhil-incomm authored Nov 22, 2024
1 parent e5066cf commit f257944
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions jpos/src/main/java/org/jpos/util/Metrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,13 @@ public void dumpHistograms (File dir, String prefix) {
public void setConversion(double conversion) {
this.conversion = conversion;
}

/**
* Reset any value counts accumulated thus far.
*/
public void reset() {
metrics.values()
.forEach(Histogram::reset);
}

}

0 comments on commit f257944

Please sign in to comment.