diff options
Diffstat (limited to 'lib/gitlab/cycle_analytics/test_stage.rb')
-rw-r--r-- | lib/gitlab/cycle_analytics/test_stage.rb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/gitlab/cycle_analytics/test_stage.rb b/lib/gitlab/cycle_analytics/test_stage.rb index 58f72bb405e..a105e5f2b1f 100644 --- a/lib/gitlab/cycle_analytics/test_stage.rb +++ b/lib/gitlab/cycle_analytics/test_stage.rb @@ -1,14 +1,19 @@ module Gitlab module CycleAnalytics class TestStage < BaseStage - def description - "Total test time for all commits/merges" + def initialize(*args) + @start_time_attrs = mr_metrics_table[:latest_build_started_at] + @end_time_attrs = mr_metrics_table[:latest_build_finished_at] + + super(*args) end - def median - @fetcher.median(:test, - MergeRequest::Metrics.arel_table[:latest_build_started_at], - MergeRequest::Metrics.arel_table[:latest_build_finished_at]) + def stage + :test + end + + def description + "Total test time for all commits/merges" end end end |