Commit 47ad777a authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '212962-cluster-distinct_by_user-to-move-to-batch-counting-prometheus' into 'master'

Move Clusters::Applications::Prometheus to batch counting

See merge request gitlab-org/gitlab!29006
parents 94a2139f 2d02cdfa
......@@ -257,7 +257,7 @@ module EE
def usage_activity_by_stage_monitor(time_period)
{
clusters: distinct_count(::Clusters::Cluster.where(time_period), :user_id),
clusters_applications_prometheus: ::Clusters::Applications::Prometheus.where(time_period).distinct_by_user,
clusters_applications_prometheus: clusters_user_distinct_count(::Clusters::Applications::Prometheus, time_period),
operations_dashboard_default_dashboard: count(::User.active.with_dashboard('operations').where(time_period)),
operations_dashboard_users_with_projects_added: distinct_count(UsersOpsDashboardProject.joins(:user).merge(::User.active).where(time_period), :user_id),
projects_prometheus_active: distinct_count(::Project.with_active_prometheus_service.where(time_period), :creator_id),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment