diff options
Diffstat (limited to 'lib/gitlab/usage_data.rb')
-rw-r--r-- | lib/gitlab/usage_data.rb | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index 35c69099b01..c69c49831fa 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -2,7 +2,6 @@ module Gitlab class UsageData - APPROXIMATE_COUNT_MODELS = [Label, MergeRequest, Note, Todo].freeze BATCH_SIZE = 100 class << self @@ -107,10 +106,12 @@ module Gitlab suggestions: count(Suggestion), todos: count(Todo), uploads: count(Upload), - web_hooks: count(WebHook) + web_hooks: count(WebHook), + labels: count(Label), + merge_requests: count(MergeRequest), + notes: count(Note) }.merge( services_usage, - approximate_counts, usage_counters, user_preferences_usage, ingress_modsecurity_usage @@ -251,16 +252,6 @@ module Gitlab fallback end - def approximate_counts - approx_counts = Gitlab::Database::Count.approximate_counts(APPROXIMATE_COUNT_MODELS) - - APPROXIMATE_COUNT_MODELS.each_with_object({}) do |model, result| - key = model.name.underscore.pluralize.to_sym - - result[key] = approx_counts[model] || -1 - end - end - def installation_type if Rails.env.production? Gitlab::INSTALLATION_TYPE |