summaryrefslogtreecommitdiff
path: root/lib/gitlab/cycle_analytics/production_stage.rb
blob: d46d37e1acc86cfe9d68df3464aa1df45a1e8612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Gitlab
  module CycleAnalytics
    class ProductionStage < BaseStage
      def initialize(*args)
        super(*args)

        @description = "From issue creation until deploy to production"
      end

      def median
        @fetcher.calculate_metric(:production,
                                  Issue.arel_table[:created_at],
                                  MergeRequest::Metrics.arel_table[:first_deployed_to_production_at])
      end
    end
  end
end