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_BY_SSE =
'g_edit_by_sse'
- EDIT_CATEGORY =
'ide_edit'
- EDIT_BY_LIVE_PREVIEW =
'g_edit_by_live_preview'
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_sse_edit_actions(date_from:, date_to:) ⇒ Object
- .count_web_ide_edit_actions(date_from:, date_to:) ⇒ Object
- .track_live_preview_edit_action(author:, time: Time.zone.now) ⇒ Object
- .track_sfe_edit_action(author:, time: Time.zone.now) ⇒ Object
- .track_snippet_editor_edit_action(author:, time: Time.zone.now) ⇒ Object
- .track_sse_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
38 39 40 41 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 38 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
26 27 28 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 26 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
34 35 36 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 34 def count_snippet_editor_edit_actions(date_from:, date_to:) count_unique(EDIT_BY_SNIPPET_EDITOR, date_from, date_to) end |
.count_sse_edit_actions(date_from:, date_to:) ⇒ Object
47 48 49 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 47 def count_sse_edit_actions(date_from:, date_to:) count_unique(EDIT_BY_SSE, date_from, date_to) end |
.count_web_ide_edit_actions(date_from:, date_to:) ⇒ Object
18 19 20 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 18 def count_web_ide_edit_actions(date_from:, date_to:) count_unique(EDIT_BY_WEB_IDE, date_from, date_to) end |
.track_live_preview_edit_action(author:, time: Time.zone.now) ⇒ Object
51 52 53 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 51 def track_live_preview_edit_action(author:, time: Time.zone.now) track_unique_action(EDIT_BY_LIVE_PREVIEW, , time) end |
.track_sfe_edit_action(author:, time: Time.zone.now) ⇒ Object
22 23 24 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 22 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
30 31 32 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 30 def track_snippet_editor_edit_action(author:, time: Time.zone.now) track_unique_action(EDIT_BY_SNIPPET_EDITOR, , time) end |
.track_sse_edit_action(author:, time: Time.zone.now) ⇒ Object
43 44 45 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 43 def track_sse_edit_action(author:, time: Time.zone.now) track_unique_action(EDIT_BY_SSE, , time) end |
.track_web_ide_edit_action(author:, time: Time.zone.now) ⇒ Object
14 15 16 |
# File 'lib/gitlab/usage_data_counters/editor_unique_counter.rb', line 14 def track_web_ide_edit_action(author:, time: Time.zone.now) track_unique_action(EDIT_BY_WEB_IDE, , time) end |