Permalink
Browse files

beautification

  • Loading branch information...
1 parent c0d6d34 commit bcdaa71c1a6f843c1bf697d83ce067349221644d @mikedanese mikedanese committed Dec 31, 2013
@@ -5,22 +5,11 @@
import java.util.ArrayList;
-/**
- * A metric which calculates the distribution of a value.
- *
- * @see <a href="http://www.johndcook.com/standard_deviation.html">Accurately computing running
- * variance</a>
- */
public class ExponentiallyDecayingHistogram implements Metric, Sampling, Counting {
private final ExponentiallyDecayingReservoir reservoir;
private final String label;
private final com.raskol.tradebot.math.LongAdder count;
- /**
- * Creates a new {@link ExponentiallyDecayingHistogram} with the given reservoir.
- *
- * @param reservoir the reservoir to create a histogram from
- */
public ExponentiallyDecayingHistogram(ExponentiallyDecayingReservoir reservoir, String label) {
this.reservoir = reservoir;
this.label = label;
@@ -31,20 +20,11 @@ public String getLabel() {
return label;
}
- /**
- * Adds a recorded value.
- *
- * @param value the length of the value
- */
+
public void update(int value) {
update((long) value);
}
- /**
- * Adds a recorded value.
- *
- * @param value the length of the value
- */
public void update(long value) {
count.increment();
reservoir.update(value);
@@ -55,11 +35,6 @@ public void update(long value, long timestamp) {
reservoir.update(value, timestamp);
}
- /**
- * Returns the number of values recorded.
- *
- * @return the number of values recorded
- */
@Override
public long getCount() {
return count.sum();
@@ -18,7 +18,6 @@ public TickerResource(TickerService tickerService) {
@GET
@Produces("text/plain")
public String getInfos() {
-
- return Joiner.on("\n\n\n\n").join(tickerService.getHistograms());
+ return Joiner.on("\n\n\n").join(tickerService.getHistograms());
}
}

0 comments on commit bcdaa71

Please sign in to comment.