Class CoverageInstructionCoveredGauge
java.lang.Object
org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector<T,I>
org.jenkinsci.plugins.prometheus.collectors.builds.BuildsMetricCollector<T,I>
org.jenkinsci.plugins.prometheus.collectors.coverage.CoverageMetricsCollector<Run<?,?>,io.prometheus.client.Gauge>
org.jenkinsci.plugins.prometheus.collectors.coverage.CoverageInstructionCoveredGauge
- All Implemented Interfaces:
MetricCollector<Run<?,?>, io.prometheus.client.Gauge>
public class CoverageInstructionCoveredGauge
extends CoverageMetricsCollector<Run<?,?>,io.prometheus.client.Gauge>
-
Field Summary
Fields inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
collector, labelNames, namePrefix, namespace, SEPARATOR, subsystem -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCoverageInstructionCoveredGauge(String[] labelNames, String namespace, String subsystem) -
Method Summary
Modifier and TypeMethodDescriptionvoidcalculateMetric(Run<?, ?> jenkinsObject, String[] labelValues) This method contains the logic to calculate a metric value based on the given Jenkins object (e.g.protected io.prometheus.client.SimpleCollector.Builder<?,io.prometheus.client.Gauge> protected CollectorTypeprotected StringMethods inherited from class org.jenkinsci.plugins.prometheus.collectors.coverage.CoverageMetricsCollector
calculatePercentage, getCoverageMethods inherited from class org.jenkinsci.plugins.prometheus.collectors.builds.BuildsMetricCollector
getBaseNameMethods inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
calculateName, collect, initCollector
-
Constructor Details
-
CoverageInstructionCoveredGauge
-
-
Method Details
-
getCollectorType
- Specified by:
getCollectorTypein classBaseMetricCollector<Run<?,?>, io.prometheus.client.Gauge> - Returns:
- - the name of the collector without subsystem, namespace, prefix
-
getHelpText
- Specified by:
getHelpTextin classBaseMetricCollector<Run<?,?>, io.prometheus.client.Gauge> - Returns:
- - the help text which should be displayed
-
getCollectorBuilder
protected io.prometheus.client.SimpleCollector.Builder<?,io.prometheus.client.Gauge> getCollectorBuilder()- Specified by:
getCollectorBuilderin classBaseMetricCollector<Run<?,?>, io.prometheus.client.Gauge> - Returns:
- - builder object of the type of collector
-
calculateMetric
Description copied from interface:MetricCollectorThis method contains the logic to calculate a metric value based on the given Jenkins object (e.g. Job, Run,...)- Specified by:
calculateMetricin interfaceMetricCollector<Run<?,?>, io.prometheus.client.Gauge> - Specified by:
calculateMetricin classBaseMetricCollector<Run<?,?>, io.prometheus.client.Gauge> - Parameters:
jenkinsObject- - Examples:Job,RunlabelValues- - The label values for the calculation
-