1 parent 7d161a8 commit 24549c0Copy full SHA for 24549c0
1 file changed
jamon/src/main/java/com/jamonapi/Monitor.java
@@ -379,7 +379,11 @@ public Monitor stop() {
379
return this;
380
}
381
382
- public Monitor add(double value) {
+ public Monitor add(double value){
383
+ return add(1,value);
384
+ }
385
+
386
+ public Monitor add(int hits, double value) { //add int hits argument
387
if (monData.enabled) {
388
synchronized (monData) {
389
/* 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) {
392
396
// most recent value
393
397
monData.lastValue = value;
394
398
// calculate hits i.e. n
395
- monData.hits++;
399
+ monData.hits += hits;
400
// calculate total i.e. sumofX's
401
monData.total += value;
402
// used in std deviation
0 commit comments