本文整理了Java中io.prometheus.client.Gauge.inc()
方法的一些代码示例,展示了Gauge.inc()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Gauge.inc()
方法的具体详情如下:
包路径:io.prometheus.client.Gauge
类名称:Gauge
方法名:inc
[英]Increment the gauge with no labels by 1.
[中]将没有标签的仪表增加1。
代码示例来源:origin: zalando/zalenium
/**
* @see GridRegistry#addNewSessionRequest(RequestHandler)
*/
public void addNewSessionRequest(RequestHandler handler) {
try {
lock.lock();
Map<String, Object> requestedCapabilities = handler.getRequest().getDesiredCapabilities();
proxies.verifyAbilityToHandleDesiredCapabilities(requestedCapabilities);
requestedCapabilities.forEach((k, v) -> MDC.put(k,v.toString()));
LOG.info("Adding sessionRequest for " + requestedCapabilities.toString());
newSessionQueue.add(handler);
seleniumTestSessionsWaiting.inc();
fireMatcherStateChanged();
} finally {
MDC.clear();
lock.unlock();
}
}
代码示例来源:origin: prometheus/client_java
/**
* Increment the gauge with no labels by 1.
*/
public void inc() {
inc(1);
}
/**
代码示例来源:origin: prometheus/client_java
@Benchmark
@BenchmarkMode({Mode.AverageTime})
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void prometheusSimpleGaugeNoLabelsIncBenchmark() {
prometheusSimpleGaugeNoLabels.inc();
}
代码示例来源:origin: io.prometheus/simpleclient
/**
* Increment the gauge with no labels by 1.
*/
public void inc() {
inc(1);
}
/**
代码示例来源:origin: org.apache.pulsar/pulsar-proxy
@Override
public void channelRegistered(ChannelHandlerContext ctx) throws Exception {
super.channelRegistered(ctx);
activeConnections.inc();
if (activeConnections.get() > service.getConfiguration().getMaxConcurrentInboundConnections()) {
ctx.close();
rejectedConnections.inc();
return;
}
}
代码示例来源:origin: dabbotorg/java-music-bot
audioManager.openAudioConnection(voiceChannel);
if (inc) {
audioStreams.inc();
代码示例来源:origin: avaire/avaire
Metrics.guilds.inc();
Metrics.geoTracker.labels(event.getGuild().getRegion().getName()).inc();
内容来源于网络,如有侵权,请联系作者删除!