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
872d67b9
Commit
872d67b9
authored
Jun 02, 2021
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add metric operation to generic and redis_hll metrics
parent
00622aef
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
lib/gitlab/usage/metrics/instrumentations/database_metric.rb
lib/gitlab/usage/metrics/instrumentations/database_metric.rb
+1
-5
lib/gitlab/usage/metrics/instrumentations/generic_metric.rb
lib/gitlab/usage/metrics/instrumentations/generic_metric.rb
+4
-3
lib/gitlab/usage/metrics/instrumentations/redis_hll_metric.rb
...gitlab/usage/metrics/instrumentations/redis_hll_metric.rb
+6
-3
No files found.
lib/gitlab/usage/metrics/instrumentations/database_metric.rb
View file @
872d67b9
1
# frozen_string_literal: true
# frozen_string_literal: true
module
Gitlab
module
Usage
...
...
@@ -55,10 +55,6 @@ module Gitlab
)
end
def
relation
self
.
class
.
metric_relation
.
call
.
where
(
time_constraints
)
end
private
def
relation
...
...
lib/gitlab/usage/metrics/instrumentations/generic_metric.rb
View file @
872d67b9
...
...
@@ -13,6 +13,9 @@ module Gitlab
# end
# end
class
<<
self
attr_reader
:metric_operation
@metric_operation
=
:alt
def
value
(
&
block
)
@metric_value
=
block
end
...
...
@@ -28,9 +31,7 @@ module Gitlab
def
suggested_name
Gitlab
::
Usage
::
Metrics
::
NameSuggestion
.
for
(
:alt
,
relation:
nil
,
column:
nil
self
.
class
.
metric_operation
)
end
end
...
...
lib/gitlab/usage/metrics/instrumentations/redis_hll_metric.rb
View file @
872d67b9
...
...
@@ -12,6 +12,11 @@ module Gitlab
# events:
# - g_analytics_valuestream
# end
class
<<
self
attr_reader
:metric_operation
@metric_operation
=
:redis
end
def
initialize
(
time_frame
:,
options:
{})
super
...
...
@@ -32,9 +37,7 @@ module Gitlab
def
suggested_name
Gitlab
::
Usage
::
Metrics
::
NameSuggestion
.
for
(
:redis
,
relation:
nil
,
column:
nil
self
.
class
.
metric_operation
)
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