Class DoraCalculator
java.lang.Object
io.jenkins.plugins.dorametrics.dora.DoraCalculator
Calculates all four DORA metrics from stored build data.
Uses optimized SQL aggregates where possible.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe four metrics for one day, as the cards show them for a whole period.static enumstatic class -
Constructor Summary
ConstructorsConstructorDescriptionDoraCalculator(MetricsStore store, DoraGlobalConfiguration config) Constructor for testing with injected dependencies.DoraCalculator(MetricsStore store, DoraGlobalConfiguration config, Set<String> excludedJobs) Constructor with an explicit set of jobs to leave out. -
Method Summary
Modifier and TypeMethodDescriptionchangeFailureRate(long fromMs, long toMs, String jobPattern) Change Failure Rate: failed deployments as a share of all deployments.dailyMetrics(long fromMs, long toMs, String jobPattern, ZoneId zone) The four metrics day by day across the window, every day present, each build counted on the day it started inzone, with the same filters as the whole-period metrics.deploymentFrequency(long fromMs, long toMs, String jobPattern) Deployment Frequency: successful deploys per day.Narrows this calculator's daily figures to one job, read by its name.leadTimeForChanges(long fromMs, long toMs, String jobPattern) Lead Time for Changes: avg time from commit to deploy.meanTimeToRestore(long fromMs, long toMs, String jobPattern) MTTR: average time from the first failure of a run of failures until the build that fixed it finished.
-
Constructor Details
-
DoraCalculator
public DoraCalculator() -
DoraCalculator
Constructor for testing with injected dependencies. -
DoraCalculator
Constructor with an explicit set of jobs to leave out.
-
-
Method Details
-
deploymentFrequency
Deployment Frequency: successful deploys per day. -
leadTimeForChanges
Lead Time for Changes: avg time from commit to deploy. -
meanTimeToRestore
MTTR: average time from the first failure of a run of failures until the build that fixed it finished. A run of failures that began before the window counts when its fix lands inside the window. One that is still open is not counted: it has no end yet. -
changeFailureRate
Change Failure Rate: failed deployments as a share of all deployments. Aborted and not-built builds deployed nothing, so they count toward neither. -
forJob
Narrows this calculator's daily figures to one job, read by its name. The job pattern passed alongside still has to match only that job. -
dailyMetrics
public SortedMap<LocalDate,DoraCalculator.Day> dailyMetrics(long fromMs, long toMs, String jobPattern, ZoneId zone) The four metrics day by day across the window, every day present, each build counted on the day it started inzone, with the same filters as the whole-period metrics.
-