Class DoraCalculator

java.lang.Object
io.jenkins.plugins.dorametrics.dora.DoraCalculator

public class DoraCalculator extends Object
Calculates all four DORA metrics from stored build data. Uses optimized SQL aggregates where possible.
  • Constructor Details

  • Method Details

    • deploymentFrequency

      public DoraCalculator.DoraMetric deploymentFrequency(long fromMs, long toMs, String jobPattern)
      Deployment Frequency: successful deploys per day.
    • leadTimeForChanges

      public DoraCalculator.DoraMetric leadTimeForChanges(long fromMs, long toMs, String jobPattern)
      Lead Time for Changes: avg time from commit to deploy.
    • meanTimeToRestore

      public DoraCalculator.DoraMetric 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. 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

      public DoraCalculator.DoraMetric changeFailureRate(long fromMs, long toMs, String jobPattern)
      Change Failure Rate: failed deployments as a share of all deployments. Aborted and not-built builds deployed nothing, so they count toward neither.
    • forJob

      public DoraCalculator forJob(String jobName)
      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 in zone, with the same filters as the whole-period metrics.