Class PrintMetrics

java.lang.Object
io.perl.logger.impl.Metrics
io.perl.logger.impl.PrintMetrics
All Implemented Interfaces:
Print
Direct Known Subclasses:
PrometheusMetricsServer

public sealed class PrintMetrics extends Metrics implements Print permits PrometheusMetricsServer
Class for recoding/printing benchmark results on micrometer Composite Meter Registry.
  • Field Details

    • registry

      public final io.micrometer.core.instrument.MeterRegistry registry
      MeterRegistry 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 String
      percentiles - NotNull double[]
      time - Time
      latencyTimeUnit - NotNull TimeUnit
      compositeRegistry - 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 interface Print
      Parameters:
      seconds - reporting duration in seconds
      bytes - number of bytes read/write
      records - 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 factor
      slc2 - Sliding Latency Coverage factor
      percentileValues - Array of percentile Values.