Skip to content

Commit 24549c0

Browse files
committed
just forget Monitor.java
1 parent 7d161a8 commit 24549c0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

jamon/src/main/java/com/jamonapi/Monitor.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,11 @@ public Monitor stop() {
379379
return this;
380380
}
381381

382-
public Monitor add(double value) {
382+
public Monitor add(double value){
383+
return add(1,value);
384+
}
385+
386+
public Monitor add(int hits, double value) { //add int hits argument
383387
if (monData.enabled) {
384388
synchronized (monData) {
385389
/* Being as TimeMonitors already have the current time and are passing it in the value (casted as long)
@@ -392,7 +396,7 @@ public Monitor add(double value) {
392396
// most recent value
393397
monData.lastValue = value;
394398
// calculate hits i.e. n
395-
monData.hits++;
399+
monData.hits += hits;
396400
// calculate total i.e. sumofX's
397401
monData.total += value;
398402
// used in std deviation

0 commit comments

Comments
 (0)