Class CoverageClassCoveredGauge
- 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.CoverageClassCoveredGauge
-
- All Implemented Interfaces:
MetricCollector<Run<?,?>,io.prometheus.client.Gauge>
public class CoverageClassCoveredGauge 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
Constructors Modifier Constructor Description protected
CoverageClassCoveredGauge(String[] labelNames, String namespace, String subsystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculateMetric(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>
getCollectorBuilder()
protected CollectorType
getCollectorType()
protected String
getHelpText()
-
Methods inherited from class org.jenkinsci.plugins.prometheus.collectors.coverage.CoverageMetricsCollector
calculatePercentage, getCoverage
-
Methods inherited from class org.jenkinsci.plugins.prometheus.collectors.builds.BuildsMetricCollector
getBaseName
-
Methods inherited from class org.jenkinsci.plugins.prometheus.collectors.BaseMetricCollector
calculateName, collect, initCollector
-
-
-
-
Method Detail
-
getCollectorType
protected CollectorType getCollectorType()
- Specified by:
getCollectorType
in classBaseMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
- Returns:
- - the name of the collector without subsystem, namespace, prefix
-
getHelpText
protected String getHelpText()
- Specified by:
getHelpText
in 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:
getCollectorBuilder
in classBaseMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
- Returns:
- - builder object of the type of collector
-
calculateMetric
public void calculateMetric(Run<?,?> jenkinsObject, String[] labelValues)
Description copied from interface:MetricCollector
This method contains the logic to calculate a metric value based on the given Jenkins object (e.g. Job, Run,...)- Specified by:
calculateMetric
in interfaceMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
- Specified by:
calculateMetric
in classBaseMetricCollector<Run<?,?>,io.prometheus.client.Gauge>
- Parameters:
jenkinsObject
- - Examples:Job
,Run
labelValues
- - The label values for the calculation
-
-