protected boolean enable = true;
protected Integer rate;
public CommonStatsRolling(Integer rate) {
RollingWindowSet emitted = StatFunction
.keyed_counter_rolling_window_set(
StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
staticTypeMap.put(StaticsType.emitted, emitted);
RollingWindowSet sendTps = StatFunction.keyed_avg_rolling_window_set(
StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
staticTypeMap.put(StaticsType.send_tps, sendTps);
RollingWindowSet recvTps = StatFunction.keyed_avg_rolling_window_set(
StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
staticTypeMap.put(StaticsType.recv_tps, recvTps);
RollingWindowSet acked = StatFunction.keyed_counter_rolling_window_set(
StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
staticTypeMap.put(StaticsType.acked, acked);
RollingWindowSet failed = StatFunction
.keyed_counter_rolling_window_set(
StatFunction.NUM_STAT_BUCKETS, StatBuckets.STAT_BUCKETS);
staticTypeMap.put(StaticsType.failed, failed);
RollingWindowSet process_latencies = StatFunction
.keyed_avg_rolling_window_set(StatFunction.NUM_STAT_BUCKETS,
StatBuckets.STAT_BUCKETS);
staticTypeMap.put(StaticsType.process_latencies, process_latencies);