2016-11-18 15:38:02 +00:00
|
|
|
module Gitlab
|
|
|
|
module CycleAnalytics
|
|
|
|
class ReviewStage < BaseStage
|
2016-11-21 16:15:25 +00:00
|
|
|
def initialize(*args)
|
|
|
|
super(*args)
|
|
|
|
|
|
|
|
@description = "Time between merge request creation and merge/close"
|
|
|
|
end
|
|
|
|
|
2016-11-18 15:38:02 +00:00
|
|
|
def median
|
|
|
|
@fetcher.calculate_metric(:review,
|
|
|
|
MergeRequest.arel_table[:created_at],
|
|
|
|
MergeRequest::Metrics.arel_table[:merged_at])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|