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
eafdc87d
Commit
eafdc87d
authored
Apr 06, 2022
by
Axel García
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update lib/gitlab/usage_data_counters/hll_redis_counter.rb
parent
b6c24b62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/usage_data_counters/hll_redis_counter.rb
lib/gitlab/usage_data_counters/hll_redis_counter.rb
+4
-4
No files found.
lib/gitlab/usage_data_counters/hll_redis_counter.rb
View file @
eafdc87d
...
...
@@ -81,7 +81,7 @@ module Gitlab
track
(
values
,
event_name
,
context:
context
,
time:
time
)
end
# Count unique events for a given
d
time range.
# Count unique events for a given time range.
#
# event_names - The list of the events to count.
# start_date - The start date of the time range.
...
...
@@ -106,12 +106,12 @@ module Gitlab
known_events
.
select
{
|
event
|
event
[
:category
]
==
category
.
to_s
}.
map
{
|
event
|
event
[
:name
]
}
end
# Recent 7 or 28 days unique events data for events defin
it
ed in /lib/gitlab/usage_data_counters/known_events/
# Recent 7 or 28 days unique events data for events defined in /lib/gitlab/usage_data_counters/known_events/
#
# - For metrics for which we store a key per day, we have the last 7 days or last 28 days of data.
# - For metrics for which we store a key per week we have the last complete week or last 4 complete weeks
# - For metrics for which we store a key per week
,
we have the last complete week or last 4 complete weeks
# daily or weekly information is in the file we have for events definition /lib/gitlab/usage_data_counters/known_events/
# - Most of the metrics have weekly aggregation
, we recommend this as it generates less keys in r
edis to store.
# - Most of the metrics have weekly aggregation
. We recommend this as it generates fewer keys in R
edis to store.
# - The aggregation used doesn't affect data granulation.
def
unique_events_data
categories
.
each_with_object
({})
do
|
category
,
category_results
|
...
...
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