Commit 05c6c63a authored by alinamihaila's avatar alinamihaila

Move clusters counters to batch counting

Move clusters_applications_cert_managers to batch counting
parent 7ebbf830
---
title: Move Clusters Application CertManager to batch counting
merge_request: 28771
author:
type: performance
......@@ -199,7 +199,7 @@ module EE
# rubocop:disable CodeReuse/ActiveRecord
def usage_activity_by_stage_configure(time_period)
{
clusters_applications_cert_managers: ::Clusters::Applications::CertManager.where(time_period).distinct_by_user,
clusters_applications_cert_managers: distinct_count(::Clusters::Applications::CertManager.where(time_period).available.joins(:cluster), 'clusters.user_id'),
clusters_applications_helm: ::Clusters::Applications::Helm.where(time_period).distinct_by_user,
clusters_applications_ingress: ::Clusters::Applications::Ingress.where(time_period).distinct_by_user,
clusters_applications_knative: ::Clusters::Applications::Knative.where(time_period).distinct_by_user,
......
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