summaryrefslogtreecommitdiff
path: root/lib/gitlab/cycle_analytics/production_stage.rb
blob: acd2f7b2b3b5a02af82c052ed96cb22e3754cd3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Gitlab
  module CycleAnalytics
    class ProductionStage < BaseStage
      def description
        "From issue creation until deploy to production"
      end

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