當前位置: 首頁>>代碼示例>>Java>>正文


Java MetricRegistry.counter方法代碼示例

本文整理匯總了Java中com.codahale.metrics.MetricRegistry.counter方法的典型用法代碼示例。如果您正苦於以下問題:Java MetricRegistry.counter方法的具體用法?Java MetricRegistry.counter怎麽用?Java MetricRegistry.counter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.codahale.metrics.MetricRegistry的用法示例。


在下文中一共展示了MetricRegistry.counter方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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

示例2: 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

示例3: ConnectionLimiter

import com.codahale.metrics.MetricRegistry; //導入方法依賴的package包/類
public ConnectionLimiter(MetricRegistry metrics, int maxConnections) {
  this.maxConnections = maxConnections;
  this.numConnections = new AtomicInteger(0);
  this.connections = metrics.counter(name(Router.class, "Active Connections"));
}
 
開發者ID:Nordstrom,項目名稱:xrpc,代碼行數:6,代碼來源:ConnectionLimiter.java

示例4: SingleThreadNestedCounter

import com.codahale.metrics.MetricRegistry; //導入方法依賴的package包/類
public SingleThreadNestedCounter(MetricRegistry registry, String name) {
  super();
  this.counter = registry.counter(name);
}
 
開發者ID:skhalifa,項目名稱:QDrill,代碼行數:5,代碼來源:SingleThreadNestedCounter.java

示例5: PGConnectionTester

import com.codahale.metrics.MetricRegistry; //導入方法依賴的package包/類
PGConnectionTester(@NonNull MetricRegistry registry) {
    connectionFailureMetric = registry.counter(new PGMetricNames().connectionFailure());
}
 
開發者ID:uweschaefer,項目名稱:factcast,代碼行數:4,代碼來源:PGConnectionTester.java


注:本文中的com.codahale.metrics.MetricRegistry.counter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。