Class SolrMetricTestUtils

java.lang.Object
org.apache.solr.util.SolrMetricTestUtils

public final class SolrMetricTestUtils extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    getCacheSearcherLookups(org.apache.solr.core.SolrCore core, String cacheName, String result)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    getCacheSearcherOps(org.apache.solr.core.SolrCore core, String cacheName, String operation)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    getCacheSearcherOpsHits(org.apache.solr.core.SolrCore core, String cacheName)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    getCacheSearcherOpsInserts(org.apache.solr.core.SolrCore core, String cacheName)
     
    static double
    getCacheSearcherTotalLookups(org.apache.solr.core.SolrCore core, String cacheName)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    getCounterDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    getCounterDatapoint(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
     
    static io.prometheus.metrics.model.snapshots.DataPointSnapshot
    getDataPointSnapshot(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    Looks up the first MetricSnapshot named metricName, and returns the first DataPointSnapshot having exactly these labels.
    static io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot
    getGaugeDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
     
    static io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot
    getGaugeDatapoint(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
     
    static io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot
    getHistogramDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
     
    static io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot
    getHistogramDatapoint(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
     
    static <S extends io.prometheus.metrics.model.snapshots.MetricSnapshot>
    S
    getMetricSnapshot(Class<S> snapshotClass, io.prometheus.metrics.model.snapshots.MetricSnapshots metrics, String name)
     
    static org.apache.solr.metrics.otel.FilterablePrometheusMetricReader
    getPrometheusMetricReader(org.apache.solr.core.CoreContainer container, String registryName)
     
    static org.apache.solr.metrics.otel.FilterablePrometheusMetricReader
    getPrometheusMetricReader(org.apache.solr.core.SolrCore core)
     
    static org.apache.solr.core.SolrInfoBean.Category
     
    static Map<String,Long>
     
    static io.prometheus.metrics.model.snapshots.Labels.Builder
    newCloudLabelsBuilder(org.apache.solr.core.SolrCore core)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    newCloudSelectRequestsDatapoint(org.apache.solr.core.SolrCore core)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    newCloudUpdateRequestsDatapoint(org.apache.solr.core.SolrCore core)
     
    static io.prometheus.metrics.model.snapshots.Labels.Builder
     
    static io.prometheus.metrics.model.snapshots.Labels.Builder
    newStandaloneLabelsBuilder(org.apache.solr.core.SolrCore core)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    newStandaloneSelectRequestsDatapoint(org.apache.solr.core.SolrCore core)
     
    static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot
    newStandaloneUpdateRequestsDatapoint(org.apache.solr.core.SolrCore core)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SolrMetricTestUtils

      public SolrMetricTestUtils()
  • Method Details

    • getRandomCategory

      public static org.apache.solr.core.SolrInfoBean.Category getRandomCategory(Random random)
    • getRandomPrometheusMetricsWithReplacements

      public static Map<String,Long> getRandomPrometheusMetricsWithReplacements(Random random, Map<String,Long> existing)
    • getDataPointSnapshot

      public static io.prometheus.metrics.model.snapshots.DataPointSnapshot getDataPointSnapshot(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
      Looks up the first MetricSnapshot named metricName, and returns the first DataPointSnapshot having exactly these labels. Null if not found. The result is typically cast to something useful.
    • newCloudLabelsBuilder

      public static io.prometheus.metrics.model.snapshots.Labels.Builder newCloudLabelsBuilder(org.apache.solr.core.SolrCore core)
    • newStandaloneLabelsBuilder

      public static io.prometheus.metrics.model.snapshots.Labels.Builder newStandaloneLabelsBuilder(org.apache.solr.core.SolrCore core)
    • newStandaloneLabelsBuilder

      public static io.prometheus.metrics.model.snapshots.Labels.Builder newStandaloneLabelsBuilder(String coreName)
    • getPrometheusMetricReader

      public static org.apache.solr.metrics.otel.FilterablePrometheusMetricReader getPrometheusMetricReader(org.apache.solr.core.SolrCore core)
    • getPrometheusMetricReader

      public static org.apache.solr.metrics.otel.FilterablePrometheusMetricReader getPrometheusMetricReader(org.apache.solr.core.CoreContainer container, String registryName)
    • getMetricSnapshot

      public static <S extends io.prometheus.metrics.model.snapshots.MetricSnapshot> S getMetricSnapshot(Class<S> snapshotClass, io.prometheus.metrics.model.snapshots.MetricSnapshots metrics, String name)
    • getGaugeDatapoint

      public static io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot getGaugeDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • getCounterDatapoint

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot getCounterDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • getCounterDatapoint

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot getCounterDatapoint(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • getGaugeDatapoint

      public static io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot getGaugeDatapoint(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • getHistogramDatapoint

      public static io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot getHistogramDatapoint(org.apache.solr.metrics.otel.FilterablePrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • getHistogramDatapoint

      public static io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot getHistogramDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • newStandaloneSelectRequestsDatapoint

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot newStandaloneSelectRequestsDatapoint(org.apache.solr.core.SolrCore core)
    • newCloudSelectRequestsDatapoint

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot newCloudSelectRequestsDatapoint(org.apache.solr.core.SolrCore core)
    • newStandaloneUpdateRequestsDatapoint

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot newStandaloneUpdateRequestsDatapoint(org.apache.solr.core.SolrCore core)
    • newCloudUpdateRequestsDatapoint

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot newCloudUpdateRequestsDatapoint(org.apache.solr.core.SolrCore core)
    • getCacheSearcherOps

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot getCacheSearcherOps(org.apache.solr.core.SolrCore core, String cacheName, String operation)
    • getCacheSearcherLookups

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot getCacheSearcherLookups(org.apache.solr.core.SolrCore core, String cacheName, String result)
    • getCacheSearcherOpsHits

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot getCacheSearcherOpsHits(org.apache.solr.core.SolrCore core, String cacheName)
    • getCacheSearcherTotalLookups

      public static double getCacheSearcherTotalLookups(org.apache.solr.core.SolrCore core, String cacheName)
    • getCacheSearcherOpsInserts

      public static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshot getCacheSearcherOpsInserts(org.apache.solr.core.SolrCore core, String cacheName)