本文整理匯總了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());
}
示例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"));
}
示例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"));
}
示例4: SingleThreadNestedCounter
import com.codahale.metrics.MetricRegistry; //導入方法依賴的package包/類
public SingleThreadNestedCounter(MetricRegistry registry, String name) {
super();
this.counter = registry.counter(name);
}
示例5: PGConnectionTester
import com.codahale.metrics.MetricRegistry; //導入方法依賴的package包/類
PGConnectionTester(@NonNull MetricRegistry registry) {
connectionFailureMetric = registry.counter(new PGMetricNames().connectionFailure());
}