Refactor contribution analytics data collector
What does this MR do and why?
Splits Gitlab::ContributionAnalytics::DataCollector
logic into two additional classes:
-
Gitlab::ContributionAnalytics::DataFormatter
which receive an array of events and formats data into counts by event. -
Gitlab::ContributionAnalytics::PostgresqlDataCollector
execute query to get data from database.
This split is necessary because we will eventually gather data from ClickHouse database
the refactoring would easily allow us to introduce Gitlab::ContributionAnalytics::ClickHouseDataCollector
This does not change any contribution analytics behavior.
related to #414604 (closed)
MR acceptance checklist.
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Felipe Cardozo