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


Java MetricRegistry.meter方法代码示例

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


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

示例1: AnomalyDetector

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
public AnomalyDetector(KafkaCruiseControlConfig config,
                       LoadMonitor loadMonitor,
                       KafkaCruiseControl kafkaCruiseControl,
                       Time time,
                       MetricRegistry dropwizardMetricRegistry) {
  _anomalies = new LinkedBlockingDeque<>();
  _anomalyDetectionIntervalMs = config.getLong(KafkaCruiseControlConfig.ANOMALY_DETECTION_INTERVAL_MS_CONFIG);
  _anomalyNotifier = config.getConfiguredInstance(KafkaCruiseControlConfig.ANOMALY_NOTIFIER_CLASS_CONFIG,
                                                  AnomalyNotifier.class);
  _goalViolationDetector = new GoalViolationDetector(config, loadMonitor, _anomalies, time);
  _brokerFailureDetector = new BrokerFailureDetector(config, loadMonitor, _anomalies, time);
  _kafkaCruiseControl = kafkaCruiseControl;
  _detectorScheduler =
      Executors.newScheduledThreadPool(3, new KafkaCruiseControlThreadFactory("AnomalyDetector", false, LOG));
  _shutdown = false;
  _brokerFailureRate = dropwizardMetricRegistry.meter(MetricRegistry.name("AnomalyDetector", "broker-failure-rate"));
  _goalViolationRate = dropwizardMetricRegistry.meter(MetricRegistry.name("AnomalyDetector", "goal-violation-rate"));

}
 
开发者ID:linkedin,项目名称:cruise-control,代码行数:20,代码来源:AnomalyDetector.java

示例2: configureMetrics

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
private void configureMetrics(MetricRegistry metrics) {
  saveNamespaceTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "saveNamespaceTimer"));
  saveOwnerTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "saveOwnerTimer"));
  saveServiceTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "saveServiceTimer"));
  saveMemberTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "saveMemberTimer"));
  readNamespaceTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "readNamespaceTimer"));
  removeRelationTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "removeRelationTimer"));
  readCacheTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "readCacheTimer"));
  addToCacheTimer = metrics.timer(MetricRegistry.name(DefaultGroupService.class,
      "addToCacheTimer"));
  loadCacheMissMeter = metrics.meter(MetricRegistry.name(DefaultGroupService.class,
      "loadCacheMissMeter"));
  loadCacheHitMeter = metrics.meter(MetricRegistry.name(DefaultGroupService.class,
      "loadCacheHitMeter"));
}
 
开发者ID:dehora,项目名称:outland,代码行数:23,代码来源:DefaultGroupService.java

示例3: DynamoDbCommand

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
public DynamoDbCommand(
    String commandName,
    Supplier<R> storageAction,
    Supplier<R> fallbackAction,
    HystrixConfiguration hystrixConfiguration,
    MetricRegistry metrics
) {
  super(hystrixConfiguration.getHystrixCommandSetter());
  this.commandName = commandName;
  this.storageAction = storageAction;
  this.fallbackAction = fallbackAction;
  this.timer = metrics.timer(MetricRegistry.name(this.getClass(), commandName + ".timer"));
  this.meter = metrics.meter(MetricRegistry.name(this.getClass(), commandName + ".meter"));
  this.failMeter =
      metrics.meter(MetricRegistry.name(this.getClass(), commandName + ".failMeter"));
  this.throughputFailMeter =
      metrics.meter(MetricRegistry.name(this.getClass(), commandName + ".throughputFailMeter"));
}
 
开发者ID:dehora,项目名称:outland,代码行数:19,代码来源:DynamoDbCommand.java

示例4: configureMetrics

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
private void configureMetrics(MetricRegistry metrics) {
  saveFeatureTimer = metrics.timer(MetricRegistry.name(DefaultFeatureService.class,
      "saveFeatureTimer"));
  updateFeatureTimer = metrics.timer(MetricRegistry.name(DefaultFeatureService.class,
      "updateFeatureTimer"));
  addToCacheTimer = metrics.timer(MetricRegistry.name(DefaultFeatureService.class,
      "addToCacheTimer"));
  loadFeaturesTimer = metrics.timer(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeaturesTimer"));
  loadFeaturesCacheTimer = metrics.timer(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeaturesCacheTimer"));
  loadFeaturesCacheHitMeter = metrics.meter(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeaturesCacheHitMeter"));
  loadFeaturesCacheMissMeter = metrics.meter(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeaturesCacheMissMeter"));
  loadFeatureByKeyTimer = metrics.timer(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeatureByKeyTimer"));
  loadFeatureCacheTimer = metrics.timer(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeatureCacheTimer"));
  loadFeatureCacheHitMeter = metrics.meter(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeatureCacheHitMeter"));
  loadFeatureCacheMissMeter = metrics.meter(MetricRegistry.name(DefaultFeatureService.class,
      "loadFeatureCacheMissMeter"));
}
 
开发者ID:dehora,项目名称:outland,代码行数:25,代码来源:DefaultFeatureService.java

示例5: RedisCacheCommand

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
public RedisCacheCommand(
    String commandName,
    Supplier<T> cacheAction,
    Supplier<T> fallbackAction,
    HystrixConfiguration hystrixConfiguration,
    MetricRegistry metrics
) {
  super(hystrixConfiguration.getHystrixCommandSetter());
  this.commandName = commandName;
  this.cacheAction = cacheAction;
  this.fallbackAction = fallbackAction;
  this.timer = metrics.timer(MetricRegistry.name(this.getClass(), commandName + ".timer"));
  this.meter = metrics.meter(MetricRegistry.name(this.getClass(), commandName + ".meter"));
  this.failMeter =
      metrics.meter(MetricRegistry.name(this.getClass(), commandName + ".failMeter"));
}
 
开发者ID:dehora,项目名称:outland,代码行数:17,代码来源:RedisCacheCommand.java

示例6: PGFactStore

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
@Autowired
public PGFactStore(JdbcTemplate jdbcTemplate, PGSubscriptionFactory subscriptionFactory,
        MetricRegistry registry) {
    this.jdbcTemplate = jdbcTemplate;
    this.subscriptionFactory = subscriptionFactory;
    this.registry = registry;

    publishFailedCounter = registry.counter(names.factPublishingFailed());
    publishLatency = registry.timer(names.factPublishingLatency());
    publishMeter = registry.meter(names.factPublishingMeter());

    fetchLatency = registry.timer(names.fetchLatency());
    seqLookupLatency = registry.timer(names.seqLookupLatency());

    subscriptionCatchupMeter = registry.meter(names.subscribeCatchup());
    subscriptionFollowMeter = registry.meter(names.subscribeFollow());
}
 
开发者ID:uweschaefer,项目名称:factcast,代码行数:18,代码来源:PGFactStore.java

示例7: MineboxExport

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
@Inject
public MineboxExport(MinebdConfig config, MetricRegistry metrics, BucketFactory bucketFactory) {
    this.config = config;
    files = createFilesCache(config);
    this.bucketSize = config.bucketSize.toBytes();
    read = metrics.meter("readBytes");
    write = metrics.meter("writeBytes");
    this.bucketFactory = bucketFactory;
    metrics.gauge("openfiles", () -> files::size);

}
 
开发者ID:MineboxOS,项目名称:minebox,代码行数:12,代码来源:MineboxExport.java

示例8: MessageBuffer

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
@Inject
public MessageBuffer(MessageBufferConfiguration config, MetricRegistry metricRegistry) {
    this.metricRegistry = metricRegistry;
    this.queue = Queues.newLinkedBlockingQueue(config.getSize());

    this.inserted = metricRegistry.meter(name(getClass(), "inserted"));
    this.removed = metricRegistry.meter(name(getClass(), "removed"));
}
 
开发者ID:DevOpsStudio,项目名称:Re-Collector,代码行数:9,代码来源:MessageBuffer.java

示例9: MetricHandler

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @param store
 *            Metric store
 */
public MetricHandler(@Nonnull final MetricStore store) {
    this.store = Objects.requireNonNull(store);

    final MetricRegistry registry = SharedMetricRegistries
            .getOrCreate("default");
    this.metricMeter = registry
            .meter(MetricRegistry.name(MetricHandler.class, "metric-rate"));
}
 
开发者ID:smoketurner,项目名称:graphiak,代码行数:15,代码来源:MetricHandler.java

示例10: FeatureStoreMetered

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
FeatureStoreMetered(FeatureStore featureStore, MetricsContext metricsContext) {
  this.featureStore = featureStore;

  MetricRegistry metrics = metricsContext.metrics();
  String context = metricsContext.context();

  this.putTimer = metrics.timer(MetricRegistry.name(
      context + "." + METRICS_PATH, "putTimer"));
  this.putMeter = metrics.meter(MetricRegistry.name(
      context + "." + METRICS_PATH, "putMeter"));
  this.findTimer = metrics.timer(MetricRegistry.name(
      metricsContext + "." + METRICS_PATH, "findTimer"));
  this.findMeter = metrics.meter(MetricRegistry.name(
      context + "." + METRICS_PATH, "findMeter"));
  this.findAllTimer = metrics.timer(MetricRegistry.name(
      context + "." + METRICS_PATH, "findAllTimer"));
  this.findAllMeter = metrics.meter(MetricRegistry.name(
      context + "." + METRICS_PATH, "findAllMeter"));
  this.flushTimer = metrics.timer(MetricRegistry.name(
      context + "." + METRICS_PATH, "flushTimer"));
  this.flushMeter = metrics.meter(MetricRegistry.name(
      context + "." + METRICS_PATH, "flushMeter"));
  this.flushAllTimer = metrics.timer(MetricRegistry.name(
      context + "." + METRICS_PATH, "flushAllTimer"));
  this.flushAllMeter = metrics.meter(MetricRegistry.name(
      context + "." + METRICS_PATH, "flushAllMeter"));
}
 
开发者ID:dehora,项目名称:outland,代码行数:28,代码来源:FeatureStoreMetered.java

示例11: ExceptionMeterMetric

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
public ExceptionMeterMetric(final MetricRegistry registry, final Method method,
        final ExceptionMetered exceptionMetered) {
    final String name = chooseName(exceptionMetered.name(), exceptionMetered.absolute(), method,
            ExceptionMetered.DEFAULT_NAME_SUFFIX);
    this.meter = registry.meter(name);
    this.cause = exceptionMetered.cause();
}
 
开发者ID:mwiede,项目名称:metrics-feign,代码行数:8,代码来源:FeignOutboundMetricsDecorator.java

示例12: MonitoredExecutorService

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
public MonitoredExecutorService(ExecutorService delegate, MetricRegistry registry, String
        name) {
    this.delegate = delegate;

    this.submitted = registry.meter(MetricRegistry.name(name, "submitted"));
    this.rejected = registry.meter(MetricRegistry.name(name, "rejected"));
    this.running = registry.counter(MetricRegistry.name(name, "running"));
    this.completed = registry.meter(MetricRegistry.name(name, "completed"));

    this.dispatchDurationTimer = registry.timer(MetricRegistry.name(name, "dispatchDuration"));
    this.durationTimer = registry.timer(MetricRegistry.name(name, "duration"));
}
 
开发者ID:fchenxi,项目名称:easyhbase,代码行数:13,代码来源:MonitoredExecutorService.java

示例13: Firewall

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
public Firewall(MetricRegistry metrics) {

    this.metrics = metrics;
    this.rateLimits = metrics.meter("Hard Rate Limits");
  }
 
开发者ID:Nordstrom,项目名称:xrpc,代码行数:6,代码来源:Firewall.java

示例14: FeatureStoreRocksDb

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
FeatureStoreRocksDb(MetricsContext metricsContext, File dbPath) {

    MetricRegistry metrics = metricsContext.metrics();
    String context = metricsContext.context();

    putTimer = metrics.timer(MetricRegistry.name(
        context + "." + METRICS_PATH, "putTimer"));
    putMeter = metrics.meter(MetricRegistry.name(
        context + "." + METRICS_PATH, "putMeter"));
    this.loadAllTimer = metrics.timer(MetricRegistry.name(
        context + "." + METRICS_PATH, "loadAllTimer"));
    this.loadAllMeter = metrics.meter(MetricRegistry.name(
        context + "." + METRICS_PATH, "loadAllMeter"));

    this.findAllTimer = metrics.timer(MetricRegistry.name(
        context + "." + METRICS_PATH, "findAllTimer"));
    this.findAllMeter = metrics.meter(MetricRegistry.name(
        context + "." + METRICS_PATH, "findAllMeter"));

    BlockBasedTableConfig tableConfig = new BlockBasedTableConfig();
    tableConfig.setBlockCacheSize(BLOCK_CACHE_SIZE);
    tableConfig.setBlockSize(BLOCK_SIZE);

    options = new Options();
    options.setTableFormatConfig(tableConfig);
    options.setWriteBufferSize(WRITE_BUFFER_SIZE);
    options.setCompressionType(COMPRESSION_TYPE);
    options.setCompactionStyle(COMPACTION_STYLE);
    options.setMaxWriteBufferNumber(MAX_WRITE_BUFFER_NUMBER);
    options.setCreateIfMissing(CREATE_IF_MISSING);
    options.setErrorIfExists(ERROR_IF_EXISTS);
    writeOptions = new WriteOptions();
    writeOptions.setDisableWAL(DISABLE_WAL);
    writeOptions.setSync(true);
    readOptions = new ReadOptions();
    readOptions.setVerifyChecksums(true);
    readOptions.setFillCache(true);
    flushOptions = new FlushOptions();
    flushOptions.setWaitForFlush(WAIT_FOR_FLUSH);

    final File parent = new File("/tmp", "outland");
    rocksDir = new File(dbPath, "feature-store");
    //noinspection ResultOfMethodCallIgnored
    rocksDir.getParentFile().mkdirs();
    rocks = initializeRocksDb(); // todo: move this out?
  }
 
开发者ID:dehora,项目名称:outland,代码行数:47,代码来源:FeatureStoreRocksDb.java

示例15: InvalidCredentialsExceptionMapper

import com.codahale.metrics.MetricRegistry; //导入方法依赖的package包/类
public InvalidCredentialsExceptionMapper(MetricRegistry metrics) {
   exceptions = metrics.meter(getClass().getCanonicalName() + " exceptions");
}
 
开发者ID:acciente,项目名称:oacc-example-securetodo,代码行数:4,代码来源:InvalidCredentialsExceptionMapper.java


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