Class: Gitlab::Analytics::CycleAnalytics::DataCollector
- Inherits:
-
Object
- Object
- Gitlab::Analytics::CycleAnalytics::DataCollector
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/analytics/cycle_analytics/data_collector.rb
Overview
Arguments:
stage - an instance of CycleAnalytics::ProjectStage or CycleAnalytics::GroupStage
params:
current_user: an instance of User
from: DateTime
to: DateTime
Instance Method Summary collapse
-
#initialize(stage:, params: {}) ⇒ DataCollector
constructor
A new instance of DataCollector.
- #median ⇒ Object
- #records_fetcher ⇒ Object
Methods included from Utils::StrongMemoize
#clear_memoization, #strong_memoize, #strong_memoized?
Constructor Details
#initialize(stage:, params: {}) ⇒ DataCollector
Returns a new instance of DataCollector.
17 18 19 20 |
# File 'lib/gitlab/analytics/cycle_analytics/data_collector.rb', line 17 def initialize(stage:, params: {}) @stage = stage @params = params end |
Instance Method Details
#median ⇒ Object
28 29 30 31 32 |
# File 'lib/gitlab/analytics/cycle_analytics/data_collector.rb', line 28 def median strong_memoize(:median) do Median.new(stage: stage, query: query) end end |
#records_fetcher ⇒ Object
22 23 24 25 26 |
# File 'lib/gitlab/analytics/cycle_analytics/data_collector.rb', line 22 def records_fetcher strong_memoize(:records_fetcher) do RecordsFetcher.new(stage: stage, query: query, params: params) end end |