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
1863a25c
Commit
1863a25c
authored
Dec 20, 2021
by
Niko Belokolodov
Committed by
Nikolay Belokolodov
Jan 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete i_package_composer_deploy_token metric
parent
4efee5d5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
config/metrics/counts_7d/20210216184805_i_package_composer_deploy_token_weekly.yml
...20210216184805_i_package_composer_deploy_token_weekly.yml
+1
-1
lib/gitlab/usage_data_counters/hll_redis_counter.rb
lib/gitlab/usage_data_counters/hll_redis_counter.rb
+1
-1
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+3
-0
No files found.
config/metrics/counts_7d/20210216184805_i_package_composer_deploy_token_weekly.yml
View file @
1863a25c
...
...
@@ -8,7 +8,7 @@ product_stage: package
product_group
:
group::package
product_category
:
package registry
value_type
:
number
status
:
deprecat
ed
status
:
remov
ed
time_frame
:
7d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
...
...
lib/gitlab/usage_data_counters/hll_redis_counter.rb
View file @
1863a25c
...
...
@@ -104,7 +104,7 @@ module Gitlab
events_names
=
events_for_category
(
category
)
event_results
=
events_names
.
each_with_object
({})
do
|
event
,
hash
|
hash
[
"
#{
event
}
_weekly"
]
=
unique_events
(
**
weekly_time_range
.
merge
(
event_names:
[
event
]))
hash
[
"
#{
event
}
_weekly"
]
=
unique_events
(
**
weekly_time_range
.
merge
(
event_names:
[
event
]))
unless
event
==
"i_package_composer_deploy_token"
hash
[
"
#{
event
}
_monthly"
]
=
unique_events
(
**
monthly_time_range
.
merge
(
event_names:
[
event
]))
end
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
1863a25c
...
...
@@ -1292,6 +1292,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
let
(
:categories
)
{
::
Gitlab
::
UsageDataCounters
::
HLLRedisCounter
.
categories
}
let
(
:ignored_metrics
)
{
[
"i_package_composer_deploy_token_weekly"
]
}
it
'has all known_events'
do
expect
(
subject
).
to
have_key
(
:redis_hll_counters
)
...
...
@@ -1301,6 +1303,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
keys
=
::
Gitlab
::
UsageDataCounters
::
HLLRedisCounter
.
events_for_category
(
category
)
metrics
=
keys
.
map
{
|
key
|
"
#{
key
}
_weekly"
}
+
keys
.
map
{
|
key
|
"
#{
key
}
_monthly"
}
metrics
-=
ignored_metrics
if
::
Gitlab
::
UsageDataCounters
::
HLLRedisCounter
::
CATEGORIES_FOR_TOTALS
.
include?
(
category
)
metrics
.
append
(
"
#{
category
}
_total_unique_counts_weekly"
,
"
#{
category
}
_total_unique_counts_monthly"
)
...
...
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