public class JLBH extends Object implements net.openhft.chronicle.core.util.NanoSampler
This class is not thread-safe.
| Modifier and Type | Field and Description |
|---|---|
static int |
TIME_CALL_NANO_TIME |
| Constructor and Description |
|---|
JLBH(@NotNull JLBHOptions jlbhOptions) |
JLBH(@NotNull JLBHOptions jlbhOptions,
@NotNull PrintStream printStream,
Consumer<JLBHResult> resultConsumer)
Use this constructor if you want to test the latencies in more automated fashion.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
@NotNull Map<String,List<double[]>> |
additionalPercentileRuns() |
net.openhft.chronicle.core.util.NanoSampler |
addProbe(String name)
Add a probe to measure a section of the benchmark.
|
protected @NotNull net.openhft.chronicle.core.util.Histogram |
createHistogram() |
void |
eventLoopHandler(@NotNull net.openhft.chronicle.core.threads.EventLoop eventLoop)
Call this instead of
start() if you want to install JLBH as a handler on your event loop thread |
List<double[]> |
percentileRuns() |
void |
printPercentilesSummary(String label,
@NotNull List<double[]> percentileRuns,
Appendable appendable) |
void |
sample(long durationNs) |
void |
sampleNanos(long durationNs) |
void |
start()
Start benchmark
|
public static final int TIME_CALL_NANO_TIME
public JLBH(@NotNull
@NotNull JLBHOptions jlbhOptions)
jlbhOptions - Options to run the benchmarkpublic JLBH(@NotNull
@NotNull JLBHOptions jlbhOptions,
@NotNull
@NotNull PrintStream printStream,
Consumer<JLBHResult> resultConsumer)
jlbhOptions - Options to run the benchmarkprintStream - Used to print text output. Use System.out to show the result on you standard out (e.g. screen)resultConsumer - If provided, accepts the result data to be retrieved after the latencies have been measuredpublic net.openhft.chronicle.core.util.NanoSampler addProbe(String name)
name - Name of probe@NotNull public @NotNull Map<String,List<double[]>> additionalPercentileRuns()
public void abort()
public void start()
public List<double[]> percentileRuns()
public void eventLoopHandler(@NotNull
@NotNull net.openhft.chronicle.core.threads.EventLoop eventLoop)
start() if you want to install JLBH as a handler on your event loop threadpublic void printPercentilesSummary(String label, @NotNull @NotNull List<double[]> percentileRuns, Appendable appendable)
public void sampleNanos(long durationNs)
sampleNanos in interface net.openhft.chronicle.core.util.NanoSamplerpublic void sample(long durationNs)
@NotNull protected @NotNull net.openhft.chronicle.core.util.Histogram createHistogram()
Copyright © 2023. All rights reserved.