diff options
author | James Lopez <james@jameslopez.es> | 2016-12-02 17:09:29 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-17 11:32:55 +0100 |
commit | b214be493d9f179d4a929ee32d94a336da7b38f1 (patch) | |
tree | f669ed4d895e4e97cb050e22e210fe90cb57ba0d /lib/gitlab/cycle_analytics/production_stage.rb | |
parent | daa4f3ded718f4144877b7f0402bd495151c28de (diff) | |
download | gitlab-ce-b214be493d9f179d4a929ee32d94a336da7b38f1.tar.gz |
big refactor based on MR feedback
Diffstat (limited to 'lib/gitlab/cycle_analytics/production_stage.rb')
-rw-r--r-- | lib/gitlab/cycle_analytics/production_stage.rb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/gitlab/cycle_analytics/production_stage.rb b/lib/gitlab/cycle_analytics/production_stage.rb index acd2f7b2b3b..104c6d3fd30 100644 --- a/lib/gitlab/cycle_analytics/production_stage.rb +++ b/lib/gitlab/cycle_analytics/production_stage.rb @@ -1,14 +1,19 @@ module Gitlab module CycleAnalytics class ProductionStage < BaseStage - def description - "From issue creation until deploy to production" + def initialize(*args) + @start_time_attrs = issue_table[:created_at] + @end_time_attrs = mr_metrics_table[:first_deployed_to_production_at] + + super(*args) end - def median - @fetcher.median(:production, - Issue.arel_table[:created_at], - MergeRequest::Metrics.arel_table[:first_deployed_to_production_at]) + def stage + :production + end + + def description + "From issue creation until deploy to production" end end end |