Package org.apache.solr.util
Class SolrMetricTestUtils
java.lang.Object
org.apache.solr.util.SolrMetricTestUtils
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotgetCacheSearcherLookups(org.apache.solr.core.SolrCore core, String cacheName, String result) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotgetCacheSearcherOps(org.apache.solr.core.SolrCore core, String cacheName, String operation) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotgetCacheSearcherOpsHits(org.apache.solr.core.SolrCore core, String cacheName) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotgetCacheSearcherOpsInserts(org.apache.solr.core.SolrCore core, String cacheName) static doublegetCacheSearcherTotalLookups(org.apache.solr.core.SolrCore core, String cacheName) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotgetCounterDatapoint(io.opentelemetry.exporter.prometheus.PrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotgetCounterDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels) static io.prometheus.metrics.model.snapshots.DataPointSnapshotgetDataPointSnapshot(io.opentelemetry.exporter.prometheus.PrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels) Looks up the firstMetricSnapshotnamedmetricName, and returns the firstDataPointSnapshothaving exactly theselabels.static io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshotgetGaugeDatapoint(io.opentelemetry.exporter.prometheus.PrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels) static io.prometheus.metrics.model.snapshots.GaugeSnapshot.GaugeDataPointSnapshotgetGaugeDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels) static io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshotgetHistogramDatapoint(io.opentelemetry.exporter.prometheus.PrometheusMetricReader reader, String metricName, io.prometheus.metrics.model.snapshots.Labels labels) static io.prometheus.metrics.model.snapshots.HistogramSnapshot.HistogramDataPointSnapshotgetHistogramDatapoint(org.apache.solr.core.SolrCore core, String metricName, io.prometheus.metrics.model.snapshots.Labels labels) static <S extends io.prometheus.metrics.model.snapshots.MetricSnapshot>
SgetMetricSnapshot(Class<S> snapshotClass, io.prometheus.metrics.model.snapshots.MetricSnapshots metrics, String name) static io.opentelemetry.exporter.prometheus.PrometheusMetricReadergetPrometheusMetricReader(org.apache.solr.core.CoreContainer container, String registryName) static io.opentelemetry.exporter.prometheus.PrometheusMetricReadergetPrometheusMetricReader(org.apache.solr.core.SolrCore core) static org.apache.solr.core.SolrInfoBean.CategorygetRandomCategory(Random random) getRandomPrometheusMetricsWithReplacements(Random random, Map<String, Long> existing) static StringgetRandomScope(Random random) static StringgetRandomScope(Random random, boolean shouldDefineScope) static io.prometheus.metrics.model.snapshots.Labels.BuildernewCloudLabelsBuilder(org.apache.solr.core.SolrCore core) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotnewCloudSelectRequestsDatapoint(org.apache.solr.core.SolrCore core) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotnewCloudUpdateRequestsDatapoint(org.apache.solr.core.SolrCore core) static io.prometheus.metrics.model.snapshots.Labels.BuildernewStandaloneLabelsBuilder(String coreName) static io.prometheus.metrics.model.snapshots.Labels.BuildernewStandaloneLabelsBuilder(org.apache.solr.core.SolrCore core) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotnewStandaloneSelectRequestsDatapoint(org.apache.solr.core.SolrCore core) static io.prometheus.metrics.model.snapshots.CounterSnapshot.CounterDataPointSnapshotnewStandaloneUpdateRequestsDatapoint(org.apache.solr.core.SolrCore core)
-
Field Details
-
QUERY_RESULT_CACHE
- See Also:
-
FILTER_CACHE
- See Also:
-
DOCUMENT_CACHE
- See Also:
-
PER_SEG_FILTER_CACHE
- See Also:
-
SUFFIX
- See Also:
-
-
Constructor Details
-
SolrMetricTestUtils
public SolrMetricTestUtils()
-
-
Method Details
-
getRandomScope
-
getRandomScope
-
getRandomCategory
-
getRandomPrometheusMetricsWithReplacements
-
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 firstMetricSnapshotnamedmetricName, and returns the firstDataPointSnapshothaving exactly theselabels. 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
-
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
-
getCacheSearcherLookups
-
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)
-