本文整理了Java中org.HdrHistogram.Recorder.recordValue
方法的一些代码示例,展示了Recorder.recordValue
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Recorder.recordValue
方法的具体详情如下:
包路径:org.HdrHistogram.Recorder
类名称:Recorder
方法名:recordValue
暂无
代码示例来源:origin: brianfrankcooper/YCSB
/**
* It appears latency is reported in micros.
* Using {@link Recorder} to support concurrent updates to histogram.
*/
public void measure(int latencyInMicros) {
histogram.recordValue(latencyInMicros);
}
代码示例来源:origin: networknt/light-4j
@Override
public void update(long value) {
recorder.recordValue(value);
}
代码示例来源:origin: networknt/light-4j
@Override
public void update(long value) {
recorder.recordValue(value);
}
代码示例来源:origin: linkedin/parseq
private synchronized void recordSafeValue(long batchAggregationTimeNano) {
initializeRecorder();
_recorder.recordValue(batchAggregationTimeNano);
}
代码示例来源:origin: linkedin/parseq
private synchronized void recordSafeValue(int batchSize) {
initializeRecorder();
_recorder.recordValue(batchSize);
}
代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core
@Override
public void update(Host host, Statement statement, Exception exception, long newLatencyNanos) {
if (!include(host, statement, exception)) return;
long latencyMs = NANOSECONDS.toMillis(newLatencyNanos);
try {
Recorder recorder = getRecorder(host, statement, exception);
if (recorder != null) recorder.recordValue(latencyMs);
} catch (ArrayIndexOutOfBoundsException e) {
logger.warn(
"Got request with latency of {} ms, which exceeds the configured maximum trackable value {}",
latencyMs,
highestTrackableLatencyMillis);
}
}
代码示例来源:origin: rsocket/rsocket-java
public Flux<Payload> startPingPong(int count, final Recorder histogram) {
return client
.flatMapMany(
rsocket ->
Flux.range(1, count)
.flatMap(
i -> {
long start = System.nanoTime();
return rsocket
.requestResponse(payload.retain())
.doOnNext(Payload::release)
.doFinally(
signalType -> {
long diff = System.nanoTime() - start;
histogram.recordValue(diff);
});
},
64))
.doOnError(Throwable::printStackTrace);
}
}
代码示例来源:origin: com.hazelcast.simulator/simulator
@Override
public void recordValue(long latencyNanos) {
if (latencyNanos > HIGHEST_TRACKABLE_VALUE) {
latencyNanos = HIGHEST_TRACKABLE_VALUE;
}
recorder.recordValue(latencyNanos);
}
代码示例来源:origin: io.engineblock/eb-api
@Override
public void update(long value) {
recorder.recordValue(value);
}
代码示例来源:origin: com.networknt/metrics
@Override
public void update(long value) {
recorder.recordValue(value);
}
代码示例来源:origin: com.yahoo.pulsar/pulsar-broker
public void recordTopicLoadTimeValue(long topicLoadLatencyMs) {
topicLoadTimeRecorder.recordValue(topicLoadLatencyMs);
}
}
代码示例来源:origin: org.attribyte/essem-reporter
@Override
public void update(long value) {
recorder.recordValue(value < this.highestTrackableValue ? value : this.highestTrackableValue);
}
代码示例来源:origin: org.mpierce.metrics.reservoir/hdrhistogram-metrics-reservoir
@Override
public void update(long value) {
recorder.recordValue(value);
}
代码示例来源:origin: org.mpierce.metrics.reservoir/hdrhistogram-metrics-reservoir
@Override
public void update(long value) {
recorder.recordValue(value);
}
代码示例来源:origin: com.datastax.oss/java-driver-core-shaded
@Override
public void update(long value) {
try {
recorder.recordValue(value / 1000);
} catch (ArrayIndexOutOfBoundsException e) {
LOG.warn("[{}] Recorded value ({}) is out of bounds, discarding", logPrefix, value);
}
}
代码示例来源:origin: org.apache.pulsar/pulsar-testclient
@OnWebSocketMessage
public void onMessage(String msg) throws JsonParseException {
JsonObject json = new Gson().fromJson(msg, JsonObject.class);
long endTimeNs = System.nanoTime();
long startTime = endTimeNs;
if (startTimeMap.get(json.get(CONTEXT).getAsString()) != null) {
startTime = startTimeMap.get(json.get(CONTEXT).getAsString());
}
long latencyNs = endTimeNs - startTime;
recorder.recordValue(NANOSECONDS.toMicros(latencyNs));
}
代码示例来源:origin: com.linkedin.parseq/parseq-batching
private synchronized void recordSafeValue(long batchAggregationTimeNano) {
initializeRecorder();
_recorder.recordValue(batchAggregationTimeNano);
}
代码示例来源:origin: com.yugabyte/cassandra-driver-core
@Override
public void update(Host host, Statement statement, Exception exception, long newLatencyNanos) {
if (!include(host, statement, exception))
return;
long latencyMs = NANOSECONDS.toMillis(newLatencyNanos);
try {
Recorder recorder = getRecorder(host, statement, exception);
if (recorder != null)
recorder.recordValue(latencyMs);
} catch (ArrayIndexOutOfBoundsException e) {
logger.warn("Got request with latency of {} ms, which exceeds the configured maximum trackable value {}",
latencyMs, highestTrackableLatencyMillis);
}
}
代码示例来源:origin: io.prestosql.cassandra/cassandra-driver
@Override
public void update(Host host, Statement statement, Exception exception, long newLatencyNanos) {
if (!include(host, statement, exception))
return;
long latencyMs = NANOSECONDS.toMillis(newLatencyNanos);
try {
Recorder recorder = getRecorder(host, statement, exception);
if (recorder != null)
recorder.recordValue(latencyMs);
} catch (ArrayIndexOutOfBoundsException e) {
logger.warn("Got request with latency of {} ms, which exceeds the configured maximum trackable value {}",
latencyMs, highestTrackableLatencyMillis);
}
}
代码示例来源:origin: io.reactivesocket/reactivesocket-test
public Flux<Payload> startPingPong(int count, final Recorder histogram) {
connect();
return Flux.range(1, count)
.flatMap(i -> {
long start = System.nanoTime();
return reactiveSocket.requestResponse(payload)
.doFinally(signalType -> {
long diff = System.nanoTime() - start;
histogram.recordValue(diff);
});
})
.doOnError(Throwable::printStackTrace);
}
}
内容来源于网络,如有侵权,请联系作者删除!