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
4f6b76bf
Commit
4f6b76bf
authored
Jun 24, 2020
by
Alishan Ladhani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harden issues_with_health_status counter
parent
31bed4c0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
ee/changelogs/unreleased/223709-harden-counts-issues_with_health_status.yml
...leased/223709-harden-counts-issues_with_health_status.yml
+5
-0
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+1
-1
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+12
-0
No files found.
ee/changelogs/unreleased/223709-harden-counts-issues_with_health_status.yml
0 → 100644
View file @
4f6b76bf
---
title
:
Optimize issues_with_health_status usage ping counter
merge_request
:
35298
author
:
type
:
performance
ee/lib/ee/gitlab/usage_data.rb
View file @
4f6b76bf
...
...
@@ -161,7 +161,7 @@ module EE
geo_nodes:
count
(
::
GeoNode
),
geo_event_log_max_id:
alt_usage_data
{
Geo
::
EventLog
.
maximum
(
:id
)
||
0
},
ldap_group_links:
count
(
::
LdapGroupLink
),
issues_with_health_status:
count
(
::
Issue
.
with_health_status
),
issues_with_health_status:
count
(
::
Issue
.
with_health_status
,
start:
issue_minimum_id
,
finish:
issue_maximum_id
),
ldap_keys:
count
(
::
LDAPKey
),
ldap_users:
count
(
::
User
.
ldap
,
'users.id'
),
pod_logs_usages_total:
redis_usage_data
{
::
Gitlab
::
UsageCounters
::
PodLogs
.
usage_totals
[
:total
]
},
...
...
lib/gitlab/usage_data.rb
View file @
4f6b76bf
...
...
@@ -564,6 +564,18 @@ module Gitlab
end
end
def
issue_minimum_id
strong_memoize
(
:issue_minimum_id
)
do
::
Issue
.
minimum
(
:id
)
end
end
def
issue_maximum_id
strong_memoize
(
:issue_maximum_id
)
do
::
Issue
.
maximum
(
:id
)
end
end
def
clear_memoized
clear_memoization
(
:user_minimum_id
)
clear_memoization
(
:user_maximum_id
)
...
...
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