Module: Gitlab::UsageDataCounters::EditorUniqueCounter
- Defined in:
- lib/gitlab/usage_data_counters/editor_unique_counter.rb
Constant Summary collapse
- EDIT_BY_SNIPPET_EDITOR =
'g_edit_by_snippet_ide'
- EDIT_BY_SFE =
'g_edit_by_sfe'
- EDIT_BY_WEB_IDE =
'g_edit_by_web_ide'
- EDIT_CATEGORY =
'ide_edit'
Class Method Summary collapse
- .count_edit_using_editor(date_from:, date_to:) ⇒ Object
- .count_sfe_edit_actions(date_from:, date_to:) ⇒ Object
- .count_snippet_editor_edit_actions(date_from:, date_to:) ⇒ Object
- .count_web_ide_edit_actions(date_from:, date_to:) ⇒ Object
- .track_sfe_edit_action(author:, time: Time.zone.now) ⇒ Object
- .track_snippet_editor_edit_action(author:, time: Time.zone.now) ⇒ Object
- .track_web_ide_edit_action(author:, time: Time.zone.now) ⇒ Object
Class Method Details
.count_edit_using_editor(date_from:, date_to:) ⇒ Object
36 37 38 39 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 36 def count_edit_using_editor(date_from:, date_to:) events = Gitlab::UsageDataCounters::HLLRedisCounter.events_for_category(EDIT_CATEGORY) count_unique(events, date_from, date_to) end |
.count_sfe_edit_actions(date_from:, date_to:) ⇒ Object
24 25 26 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 24 def count_sfe_edit_actions(date_from:, date_to:) count_unique(EDIT_BY_SFE, date_from, date_to) end |
.count_snippet_editor_edit_actions(date_from:, date_to:) ⇒ Object
32 33 34 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 32 def count_snippet_editor_edit_actions(date_from:, date_to:) count_unique(EDIT_BY_SNIPPET_EDITOR, date_from, date_to) end |
.count_web_ide_edit_actions(date_from:, date_to:) ⇒ Object
16 17 18 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 16 def count_web_ide_edit_actions(date_from:, date_to:) count_unique(EDIT_BY_WEB_IDE, date_from, date_to) end |
.track_sfe_edit_action(author:, time: Time.zone.now) ⇒ Object
20 21 22 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 20 def track_sfe_edit_action(author:, time: Time.zone.now) track_unique_action(EDIT_BY_SFE, , time) end |
.track_snippet_editor_edit_action(author:, time: Time.zone.now) ⇒ Object
28 29 30 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 28 def track_snippet_editor_edit_action(author:, time: Time.zone.now) track_unique_action(EDIT_BY_SNIPPET_EDITOR, , time) end |
.track_web_ide_edit_action(author:, time: Time.zone.now) ⇒ Object
12 13 14 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 12 def track_web_ide_edit_action(author:, time: Time.zone.now) track_unique_action(EDIT_BY_WEB_IDE, , time) end |