Permalink
Browse files

misnomer

  • Loading branch information...
1 parent 3d3abf5 commit 2ddc46f3e963d155be3e76633583dc28b805bc13 @mikedanese mikedanese committed Dec 31, 2013
Showing with 6 additions and 7 deletions.
  1. +6 −7 src/main/java/com/raskol/tradebot/service/TickerService.java
View
13 src/main/java/com/raskol/tradebot/service/TickerService.java
@@ -1,6 +1,5 @@
package com.raskol.tradebot.service;
-import com.codahale.metrics.Histogram;
import com.google.common.util.concurrent.AbstractScheduledService;
import com.raskol.tradebot.metrics.CompleteHistogram;
import com.raskol.tradebot.metrics.SlidingTimeWindowReservoir;
@@ -20,11 +19,11 @@
private final PollingMarketDataService marketDataService = ExchangeFactory.INSTANCE
.createExchange(BitstampExchange.class.getName()).getPollingMarketDataService();
- private final CompleteHistogram oneMinute = getExponentiallyDecayingHistogram("one minute", 1, TimeUnit.MINUTES);
- private final CompleteHistogram oneHour = getExponentiallyDecayingHistogram("one hour", 1, TimeUnit.HOURS);
- private final CompleteHistogram oneDay = getExponentiallyDecayingHistogram("one day", 1, TimeUnit.DAYS);
- private final CompleteHistogram fiveDays = getExponentiallyDecayingHistogram("five days", 5, TimeUnit.DAYS);
- private final CompleteHistogram oneMonth = getExponentiallyDecayingHistogram("one month", 30, TimeUnit.DAYS);
+ private final CompleteHistogram oneMinute = getHistogram("one minute", 1, TimeUnit.MINUTES);
+ private final CompleteHistogram oneHour = getHistogram("one hour", 1, TimeUnit.HOURS);
+ private final CompleteHistogram oneDay = getHistogram("one day", 1, TimeUnit.DAYS);
+ private final CompleteHistogram fiveDays = getHistogram("five days", 5, TimeUnit.DAYS);
+ private final CompleteHistogram oneMonth = getHistogram("one month", 30, TimeUnit.DAYS);
private final List<CompleteHistogram> histograms = Arrays.asList(oneMinute, oneHour, oneDay, fiveDays, oneMonth);
@Override
@@ -44,7 +43,7 @@ protected Scheduler scheduler() {
return Scheduler.newFixedRateSchedule(0, 1, TimeUnit.MINUTES);
}
- private CompleteHistogram getExponentiallyDecayingHistogram(String label, int duration, TimeUnit timeUnit) {
+ private CompleteHistogram getHistogram(String label, int duration, TimeUnit timeUnit) {
return new CompleteHistogram(new SlidingTimeWindowReservoir(duration, timeUnit), label);
}

0 comments on commit 2ddc46f

Please sign in to comment.