Skip to content

Refactor contribution analytics data collector

Felipe Cardozo requested to merge issue_414604 into master

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.

Edited by Felipe Cardozo

Merge request reports

Loading