当前位置: 首页>>代码示例>>Java>>正文


Java Metered.getFifteenMinuteRate方法代码示例

本文整理汇总了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));
    }
  }
}
 
开发者ID:circonus-labs,项目名称:metrics-circonus,代码行数:26,代码来源:CirconusReporter.java

示例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();
}
 
开发者ID:quanticc,项目名称:ugc-bot-redux,代码行数:8,代码来源:MeteredEntity.java

示例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);
}
 
开发者ID:performancecopilot,项目名称:parfait,代码行数:9,代码来源:MeteredAdapter.java


注:本文中的com.codahale.metrics.Metered.getFifteenMinuteRate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。