本文整理汇总了Java中com.codahale.metrics.Metered.getFifteenMinuteRate方法的典型用法代码示例。如果您正苦于以下问题:Java Metered.getFifteenMinuteRate方法的具体用法?Java Metered.getFifteenMinuteRate怎么用?Java Metered.getFifteenMinuteRate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.codahale.metrics.Metered
的用法示例。
在下文中一共展示了Metered.getFifteenMinuteRate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reportMetered
import com.codahale.metrics.Metered; //导入方法依赖的package包/类
private void reportMetered(String name, Metered meter, long timestamp, List<String> tags)
throws IOException {
if (expansions.contains(Expansion.COUNT)) {
request.addGauge(new CirconusGauge(
appendExpansionSuffix(name, Expansion.COUNT),
meter.getCount(),
timestamp,
host,
tags));
}
double[] values = { meter.getOneMinuteRate(), meter.getFiveMinuteRate(),
meter.getFifteenMinuteRate(), meter.getMeanRate() };
for (int i = 0; i < RATE_EXPANSIONS.length; i++) {
if (expansions.contains(RATE_EXPANSIONS[i])) {
request.addGauge(new CirconusGauge(
appendExpansionSuffix(name, RATE_EXPANSIONS[i]),
toNumber(convertRate(values[i])),
timestamp,
host,
tags));
}
}
}
示例2: MeteredEntity
import com.codahale.metrics.Metered; //导入方法依赖的package包/类
public MeteredEntity(final Metered meter) {
count = meter.getCount();
m1Rate = meter.getOneMinuteRate();
m5Rate = meter.getFiveMinuteRate();
m15Rate = meter.getFifteenMinuteRate();
meanRate = meter.getMeanRate();
}
示例3: MeteredAdapter
import com.codahale.metrics.Metered; //导入方法依赖的package包/类
public MeteredAdapter(Metered metered, String name, String description) {
this.metered = metered;
this.fifteenMinuteRate = new NonSelfRegisteringSettableValue<>(name(name, "fifteen_minute_rate"), description + " - Fifteen minute rate", ONE, metered.getFifteenMinuteRate(), ValueSemantics.FREE_RUNNING);
this.fiveMinuteRate = new NonSelfRegisteringSettableValue<>(name(name, "five_minute_rate"), description + " - Five minute rate", ONE, metered.getFiveMinuteRate(), ValueSemantics.FREE_RUNNING);
this.oneMinuteRate = new NonSelfRegisteringSettableValue<>(name(name, "one_minute_rate"), description + " - One minute rate", ONE, metered.getOneMinuteRate(), ValueSemantics.FREE_RUNNING);
this.meanRate = new NonSelfRegisteringSettableValue<>(name(name, "mean_rate"), description + " - Mean rate", ONE, metered.getMeanRate(), ValueSemantics.FREE_RUNNING);
this.count = new NonSelfRegisteringSettableValue<>(name(name, "count"), description + " - Count", ONE, metered.getCount(), ValueSemantics.MONOTONICALLY_INCREASING);
}