Class SolrMetricTestUtils

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

public final class SolrMetricTestUtils extends Object
  • Field Details

  • Constructor Details

    • SolrMetricTestUtils

      public SolrMetricTestUtils()
  • Method Details

    • getRandomScope

      public static String getRandomScope(Random random)
    • getRandomScope

      public static String getRandomScope(Random random, boolean shouldDefineScope)
    • 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(io.opentelemetry.exporter.prometheus.PrometheusMetricReader 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 casted 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 io.opentelemetry.exporter.prometheus.PrometheusMetricReader getPrometheusMetricReader(org.apache.solr.core.SolrCore core)
    • getPrometheusMetricReader

      public static io.opentelemetry.exporter.prometheus.PrometheusMetricReader 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(io.opentelemetry.exporter.prometheus.PrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • getGaugeDatapoint

      public static io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshot getGaugeDatapoint(io.opentelemetry.exporter.prometheus.PrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels)
    • getHistogramDatapoint

      public static io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshot getHistogramDatapoint(io.opentelemetry.exporter.prometheus.PrometheusMetricReader 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)