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


Java Metrics.newHistogram方法代码示例

本文整理汇总了Java中com.yammer.metrics.Metrics.newHistogram方法的典型用法代码示例。如果您正苦于以下问题:Java Metrics.newHistogram方法的具体用法?Java Metrics.newHistogram怎么用?Java Metrics.newHistogram使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.yammer.metrics.Metrics的用法示例。


在下文中一共展示了Metrics.newHistogram方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createNewMetricsGroup

import com.yammer.metrics.Metrics; //导入方法依赖的package包/类
protected MetricsGroup createNewMetricsGroup(String scope) {
  MetricName readRandomAccessName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Random Latency in \u00B5s", scope);
  MetricName readStreamAccessName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Stream Latency in \u00B5s", scope);
  MetricName writeAcccessName = new MetricName(ORG_APACHE_BLUR, HDFS, "Write Latency in \u00B5s", scope);
  MetricName readRandomThroughputName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Random Throughput", scope);
  MetricName readStreamThroughputName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Stream Throughput", scope);
  MetricName readSeekName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Stream Seeks", scope);
  MetricName writeThroughputName = new MetricName(ORG_APACHE_BLUR, HDFS, "Write Throughput", scope);
  MetricName totalHdfsBlocks = new MetricName(ORG_APACHE_BLUR, HDFS, "Hdfs Blocks Total", scope);
  MetricName localHdfsBlocks = new MetricName(ORG_APACHE_BLUR, HDFS, "Hdfs Blocks Local", scope);

  Histogram readRandomAccess = Metrics.newHistogram(readRandomAccessName);
  Histogram readStreamAccess = Metrics.newHistogram(readStreamAccessName);
  Histogram writeAccess = Metrics.newHistogram(writeAcccessName);
  Meter readRandomThroughput = Metrics.newMeter(readRandomThroughputName, "Read Random Bytes", TimeUnit.SECONDS);
  Meter readStreamThroughput = Metrics.newMeter(readStreamThroughputName, "Read Stream Bytes", TimeUnit.SECONDS);
  Meter readStreamSeek = Metrics.newMeter(readSeekName, "Read Stream Seeks", TimeUnit.SECONDS);
  Meter writeThroughput = Metrics.newMeter(writeThroughputName, "Write Bytes", TimeUnit.SECONDS);
  Counter totalHdfsBlock = Metrics.newCounter(totalHdfsBlocks);
  Counter localHdfsBlock = Metrics.newCounter(localHdfsBlocks);

  return new MetricsGroup(readRandomAccess, readStreamAccess, writeAccess, readRandomThroughput,
      readStreamThroughput, readStreamSeek, writeThroughput, totalHdfsBlock, localHdfsBlock);
}
 
开发者ID:apache,项目名称:incubator-blur,代码行数:25,代码来源:HdfsDirectory.java

示例2: createColumnFamilyHistogram

import com.yammer.metrics.Metrics; //导入方法依赖的package包/类
/**
 * Create a histogram-like interface that will register both a CF, keyspace and global level
 * histogram and forward any updates to both
 */
protected ColumnFamilyHistogram createColumnFamilyHistogram(String name, Histogram keyspaceHistogram) 
{
    Histogram cfHistogram = Metrics.newHistogram(factory.createMetricName(name), true);  
    register(name, cfHistogram);
    return new ColumnFamilyHistogram(cfHistogram, keyspaceHistogram, Metrics.newHistogram(globalNameFactory.createMetricName(name), true));
}
 
开发者ID:vcostet,项目名称:cassandra-kmean,代码行数:11,代码来源:ColumnFamilyMetrics.java

示例3: Benchmark

import com.yammer.metrics.Metrics; //导入方法依赖的package包/类
public Benchmark(Operation operation, int numberOfRun, int concurrentLevel) {
    this.operation = operation;
    this.concurrentLevel = concurrentLevel;
    this.numberOfRun = numberOfRun;
    this.barrier = new CyclicBarrier(concurrentLevel + 1);
    this.histogram = Metrics.newHistogram(Benchmark.class,
            "operation-histogram" + System.nanoTime());
}
 
开发者ID:btnguyen2k,项目名称:id-jclient,代码行数:9,代码来源:Benchmark.java

示例4: Benchmark

import com.yammer.metrics.Metrics; //导入方法依赖的package包/类
public Benchmark(Operation operation, int numberOfRun, int concurrentLevel) {
    this.operation = operation;
    this.concurrentLevel = concurrentLevel;
    this.numberOfRun = numberOfRun;
    this.barrier = new CyclicBarrier(concurrentLevel + 1);
    this.histogram = Metrics.newHistogram(Benchmark.class, "operation-histogram" + System.nanoTime());
}
 
开发者ID:DDTH,项目名称:osgi-bundle-frontapi,代码行数:8,代码来源:Benchmark.java

示例5: newHistogram

import com.yammer.metrics.Metrics; //导入方法依赖的package包/类
/**
 *
 * Return an existing histogram if
 *  (a) A histogram already exist with the same metric name.
 * Otherwise, creates a new meter and registers
 *
 * @param registry MetricsRegistry
 * @param name metric name
 * @param biased (true if uniform distribution, otherwise exponential weighted)
 * @return histogram
 */
public static Histogram newHistogram(MetricsRegistry registry, MetricName name, boolean biased) {
  if (registry != null) {
    return registry.newHistogram(name, biased);
  } else {
    return Metrics.newHistogram(name, biased);
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:19,代码来源:MetricsHelper.java


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