本文整理汇总了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());
}