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
12c99ada
Commit
12c99ada
authored
Aug 11, 2021
by
Luis Mejia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated metric entry
parent
7feeafc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
config/metrics/counts_7d/20210216181701_i_quickactions_reassign_reviewer_weekly.yml
...0210216181701_i_quickactions_reassign_reviewer_weekly.yml
+1
-5
spec/lib/gitlab/usage_data_metrics_spec.rb
spec/lib/gitlab/usage_data_metrics_spec.rb
+4
-4
No files found.
config/metrics/counts_7d/20210216181701_i_quickactions_reassign_reviewer_weekly.yml
View file @
12c99ada
...
@@ -14,15 +14,11 @@ instrumentation_class: RedisHLLMetric
...
@@ -14,15 +14,11 @@ instrumentation_class: RedisHLLMetric
options
:
options
:
events
:
events
:
-
i_quickactions_reassign_reviewer
-
i_quickactions_reassign_reviewer
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
i_quickactions_reassign
distribution
:
distribution
:
-
ce
-
ce
-
ee
-
ee
tier
:
tier
:
-
free
-
free
-
premium
-
premium
-
ultimate
-
ultimate
spec/lib/gitlab/usage_data_metrics_spec.rb
View file @
12c99ada
...
@@ -26,7 +26,7 @@ RSpec.describe Gitlab::UsageDataMetrics do
...
@@ -26,7 +26,7 @@ RSpec.describe Gitlab::UsageDataMetrics do
expect
(
subject
[
:counts
]).
to
include
(
:boards
)
expect
(
subject
[
:counts
]).
to
include
(
:boards
)
end
end
context
'when redis_hll
_counters'
do
describe
'Redis_HLL
_counters'
do
# categories to be merged on future MR
# categories to be merged on future MR
let
(
:ignored_metric_files_key_patterns
)
do
let
(
:ignored_metric_files_key_patterns
)
do
%w(
%w(
...
@@ -53,10 +53,10 @@ RSpec.describe Gitlab::UsageDataMetrics do
...
@@ -53,10 +53,10 @@ RSpec.describe Gitlab::UsageDataMetrics do
# Recursively traverse nested Hash of a generated Usage Ping to return an Array of key paths
# Recursively traverse nested Hash of a generated Usage Ping to return an Array of key paths
# in the dotted format used in metric definition YAML files, e.g.: 'count.category.metric_name'
# in the dotted format used in metric definition YAML files, e.g.: 'count.category.metric_name'
def
parse_
usag
e_ping_keys
(
object
,
key_path
=
[])
def
parse_
servic
e_ping_keys
(
object
,
key_path
=
[])
if
object
.
is_a?
(
Hash
)
if
object
.
is_a?
(
Hash
)
object
.
each_with_object
([])
do
|
(
key
,
value
),
result
|
object
.
each_with_object
([])
do
|
(
key
,
value
),
result
|
result
.
append
parse_
usag
e_ping_keys
(
value
,
key_path
+
[
key
])
result
.
append
parse_
servic
e_ping_keys
(
value
,
key_path
+
[
key
])
end
end
else
else
key_path
.
join
(
'.'
)
key_path
.
join
(
'.'
)
...
@@ -64,7 +64,7 @@ RSpec.describe Gitlab::UsageDataMetrics do
...
@@ -64,7 +64,7 @@ RSpec.describe Gitlab::UsageDataMetrics do
end
end
let
(
:usage_ping_key_paths
)
do
let
(
:usage_ping_key_paths
)
do
parse_
usag
e_ping_keys
(
subject
)
parse_
servic
e_ping_keys
(
subject
)
.
flatten
.
flatten
.
select
{
|
k
|
k
.
starts_with?
(
'redis_hll_counters'
)
}
.
select
{
|
k
|
k
.
starts_with?
(
'redis_hll_counters'
)
}
.
reject
{
|
k
|
k
=~
Regexp
.
union
(
ignored_metric_files_key_patterns
)
}
.
reject
{
|
k
|
k
=~
Regexp
.
union
(
ignored_metric_files_key_patterns
)
}
...
...
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