summaryrefslogtreecommitdiff
path: root/lib/gitlab/usage_data_counters
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/usage_data_counters')
-rw-r--r--lib/gitlab/usage_data_counters/web_ide_counter.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/gitlab/usage_data_counters/web_ide_counter.rb b/lib/gitlab/usage_data_counters/web_ide_counter.rb
index 6fbffb94c58..899ad0db9c0 100644
--- a/lib/gitlab/usage_data_counters/web_ide_counter.rb
+++ b/lib/gitlab/usage_data_counters/web_ide_counter.rb
@@ -6,6 +6,8 @@ module Gitlab
extend RedisCounter
COMMITS_COUNT_KEY = 'WEB_IDE_COMMITS_COUNT'
+ MERGE_REQUEST_COUNT_KEY = 'WEB_IDE_MERGE_REQUESTS_COUNT'
+ VIEWS_COUNT_KEY = 'WEB_IDE_VIEWS_COUNT'
class << self
def increment_commits_count
@@ -15,6 +17,22 @@ module Gitlab
def total_commits_count
total_count(COMMITS_COUNT_KEY)
end
+
+ def increment_merge_requests_count
+ increment(MERGE_REQUEST_COUNT_KEY)
+ end
+
+ def total_merge_requests_count
+ total_count(MERGE_REQUEST_COUNT_KEY)
+ end
+
+ def increment_views_count
+ increment(VIEWS_COUNT_KEY)
+ end
+
+ def total_views_count
+ total_count(VIEWS_COUNT_KEY)
+ end
end
end
end