Package io.perl.logger.impl
Class PrintMetrics
java.lang.Object
io.perl.logger.impl.Metrics
io.perl.logger.impl.PrintMetrics
- All Implemented Interfaces:
Print
- Direct Known Subclasses:
PrometheusMetricsServer
Class for recoding/printing benchmark results on micrometer Composite Meter Registry.
-
Field Summary
Modifier and TypeFieldDescriptionfinal io.micrometer.core.instrument.MeterRegistry
MeterRegistry registry
.Fields inherited from class io.perl.logger.impl.Metrics
avgLatencyName, bytesName, higherDiscardName, invalidLatencyRecordsName, lowerDiscardName, maxLatencyName, mbPsecName, metricPrefix, metricTimeUnit, minLatencyName, percentileFormat, percentileNames, recordsName, recsPsecName, slc1Name, slc2Name
-
Constructor Summary
ConstructorDescriptionPrintMetrics
(@NotNull String header, @org.jetbrains.annotations.NotNull double[] percentiles, Time time, @NotNull TimeUnit latencyTimeUnit, io.micrometer.core.instrument.composite.CompositeMeterRegistry compositeRegistry) Constructor PrintMetrics initializing all values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This method Closes this registry, releasing any resources in the process.final void
print
(double seconds, long bytes, long records, double recsPerSec, double mbPerSec, double avgLatency, long minLatency, long maxLatency, long invalid, long lowerDiscard, long higherDiscard, long slc1, long slc2, long[] percentileValues) Print the Periodic performance results.
-
Field Details
-
registry
public final io.micrometer.core.instrument.MeterRegistry registryMeterRegistry registry
.
-
-
Constructor Details
-
PrintMetrics
public PrintMetrics(@NotNull @NotNull String header, @NotNull @org.jetbrains.annotations.NotNull double[] percentiles, Time time, @NotNull @NotNull TimeUnit latencyTimeUnit, io.micrometer.core.instrument.composite.CompositeMeterRegistry compositeRegistry) Constructor PrintMetrics initializing all values.- Parameters:
header
- NotNull Stringpercentiles
- NotNull double[]time
- TimelatencyTimeUnit
- NotNull TimeUnitcompositeRegistry
- CompositeMeterRegistry
-
-
Method Details
-
close
public void close()This method Closes this registry, releasing any resources in the process. Once closed, this registry will no longer accept new meters and any publishing activity will cease. -
print
public final void print(double seconds, long bytes, long records, double recsPerSec, double mbPerSec, double avgLatency, long minLatency, long maxLatency, long invalid, long lowerDiscard, long higherDiscard, long slc1, long slc2, long[] percentileValues) Description copied from interface:Print
Print the Periodic performance results.- Specified by:
print
in interfacePrint
- Parameters:
seconds
- reporting duration in secondsbytes
- number of bytes read/writerecords
- data to write.recsPerSec
- records per second.mbPerSec
- Throughput value in terms of MB (Mega Bytes) per Second.avgLatency
- Average Latency.minLatency
- Minimum Latency.maxLatency
- Maximum Latency.invalid
- Number of invalid/negative latencies.lowerDiscard
- number of discarded latencies which are less than minimum latency.higherDiscard
- number of discarded latencies which are higher than maximum latency.slc1
- Sliding Latency Coverage factorslc2
- Sliding Latency Coverage factorpercentileValues
- Array of percentile Values.
-