gitlab-org--gitlab-foss/lib/gitlab/usage_data_counters/search_counter.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
441 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module UsageDataCounters
class SearchCounter < BaseCounter
KNOWN_EVENTS = %w[all_searches navbar_searches].freeze
PREFIX = nil
class << self
def redis_key(event)
require_known_event(event)
"#{event}_COUNT".upcase
end
private
def counter_key(event)
"#{event}".to_sym
end
end
end
end
end