Skip to content

Commit

Permalink
Remove unintended import of Guava classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Clint Checketts authored and jkschneider committed Nov 24, 2017
1 parent 14917ae commit 4155b7d
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,27 @@
*/
package io.micrometer.core.instrument.simple;

import com.google.common.util.concurrent.AtomicDouble;
import io.micrometer.core.instrument.AbstractMeter;
import io.micrometer.core.instrument.Counter;

import java.util.concurrent.atomic.DoubleAdder;

public class CumulativeCounter extends AbstractMeter implements Counter {
private final AtomicDouble value;
private final DoubleAdder value;

/** Create a new instance. */
public CumulativeCounter(Id id) {
super(id);
this.value = new AtomicDouble();
this.value = new DoubleAdder();
}

@Override
public void increment(double amount) {
value.getAndAdd(amount);
value.add(amount);
}

@Override
public double count() {
return value.get();
return value.sum();
}
}

0 comments on commit 4155b7d

Please sign in to comment.