summaryrefslogtreecommitdiff
path: root/lib/gitlab/usage_data_counters/web_ide_counter.rb
blob: 6fbffb94c585b7272e6766e3b2966e0db00c7eae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Gitlab
  module UsageDataCounters
    class WebIdeCounter
      extend RedisCounter

      COMMITS_COUNT_KEY = 'WEB_IDE_COMMITS_COUNT'

      class << self
        def increment_commits_count
          increment(COMMITS_COUNT_KEY)
        end

        def total_commits_count
          total_count(COMMITS_COUNT_KEY)
        end
      end
    end
  end
end