當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。