Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ff7c992e
Commit
ff7c992e
authored
Sep 12, 2019
by
Adam Hegyi
Committed by
Peter Leitzen
Sep 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup counter for Productivity Analytics
This change sets up a usage counter for productivity analytics feature.
parent
c2e46802
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-0
lib/gitlab/usage_data_counters/productivity_analytics_counter.rb
...lab/usage_data_counters/productivity_analytics_counter.rb
+8
-0
spec/lib/gitlab/usage_data_counters/productivity_analytics_counter_spec.rb
...sage_data_counters/productivity_analytics_counter_spec.rb
+9
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+2
-0
No files found.
lib/gitlab/usage_data.rb
View file @
ff7c992e
...
...
@@ -142,6 +142,7 @@ module Gitlab
Gitlab
::
UsageDataCounters
::
SnippetCounter
,
Gitlab
::
UsageDataCounters
::
SearchCounter
,
Gitlab
::
UsageDataCounters
::
CycleAnalyticsCounter
,
Gitlab
::
UsageDataCounters
::
ProductivityAnalyticsCounter
,
Gitlab
::
UsageDataCounters
::
SourceCodeCounter
,
Gitlab
::
UsageDataCounters
::
MergeRequestCounter
]
...
...
lib/gitlab/usage_data_counters/productivity_analytics_counter.rb
0 → 100644
View file @
ff7c992e
# frozen_string_literal: true
module
Gitlab::UsageDataCounters
class
ProductivityAnalyticsCounter
<
BaseCounter
KNOWN_EVENTS
=
%w[views]
.
freeze
PREFIX
=
'productivity_analytics'
end
end
spec/lib/gitlab/usage_data_counters/productivity_analytics_counter_spec.rb
0 → 100644
View file @
ff7c992e
# frozen_string_literal: true
require
'spec_helper'
describe
Gitlab
::
UsageDataCounters
::
ProductivityAnalyticsCounter
do
it_behaves_like
'a redis usage counter'
,
'ProductivityAnalytics'
,
:views
it_behaves_like
'a redis usage counter with totals'
,
:productivity_analytics
,
views:
3
end
spec/lib/gitlab/usage_data_spec.rb
View file @
ff7c992e
...
...
@@ -62,6 +62,7 @@ describe Gitlab::UsageData do
influxdb_metrics_enabled
prometheus_metrics_enabled
cycle_analytics_views
productivity_analytics_views
)
)
expect
(
subject
).
to
include
(
...
...
@@ -79,6 +80,7 @@ describe Gitlab::UsageData do
web_ide_merge_requests:
a_kind_of
(
Integer
),
navbar_searches:
a_kind_of
(
Integer
),
cycle_analytics_views:
a_kind_of
(
Integer
),
productivity_analytics_views:
a_kind_of
(
Integer
),
source_code_pushes:
a_kind_of
(
Integer
)
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment