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
8893a669
Commit
8893a669
authored
Feb 22, 2021
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harden added metrics
parent
46527a69
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
changelogs/unreleased/322099-harden-addition-for-template-repositoriu.yml
...eased/322099-harden-addition-for-template-repositoriu.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
+4
-6
No files found.
changelogs/unreleased/322099-harden-addition-for-template-repositoriu.yml
0 → 100644
View file @
8893a669
---
title
:
Harden added metrics
merge_request
:
54805
author
:
type
:
performance
ee/lib/ee/gitlab/usage_data.rb
View file @
8893a669
...
...
@@ -209,7 +209,7 @@ module EE
projects_reporting_ci_cd_back_to_github:
count
(
::
GithubService
.
active
),
status_page_projects:
count
(
::
StatusPage
::
ProjectSetting
.
enabled
),
status_page_issues:
count
(
::
Issue
.
on_status_page
,
start:
issue_minimum_id
,
finish:
issue_maximum_id
),
template_repositories:
count
(
::
Project
.
with_repos_templates
)
+
count
(
::
Project
.
with_groups_level_repos_templates
)
template_repositories:
add
(
count
(
::
Project
.
with_repos_templates
),
count
(
::
Project
.
with_groups_level_repos_templates
)
)
},
requirements_counts
,
security_products_usage
,
...
...
lib/gitlab/usage_data.rb
View file @
8893a669
...
...
@@ -192,7 +192,7 @@ module Gitlab
container_expiration_policies_usage
,
service_desk_counts
).
tap
do
|
data
|
data
[
:snippets
]
=
data
[
:personal_snippets
]
+
data
[
:project_snippets
]
data
[
:snippets
]
=
add
(
data
[
:personal_snippets
],
data
[
:project_snippets
])
end
}
end
...
...
@@ -227,7 +227,7 @@ module Gitlab
snowplow_event_counts
(
last_28_days_time_period
(
column: :collector_tstamp
)),
aggregated_metrics_monthly
).
tap
do
|
data
|
data
[
:snippets
]
=
data
[
:personal_snippets
]
+
data
[
:project_snippets
]
data
[
:snippets
]
=
add
(
data
[
:personal_snippets
],
data
[
:project_snippets
])
end
}
end
...
...
@@ -821,11 +821,9 @@ module Gitlab
def
total_alert_issues
# Remove prometheus table queries once they are deprecated
# To be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/217407.
[
count
(
Issue
.
with_alert_management_alerts
,
start:
issue_minimum_id
,
finish:
issue_maximum_id
),
add
count
(
Issue
.
with_alert_management_alerts
,
start:
issue_minimum_id
,
finish:
issue_maximum_id
),
count
(
::
Issue
.
with_self_managed_prometheus_alert_events
,
start:
issue_minimum_id
,
finish:
issue_maximum_id
),
count
(
::
Issue
.
with_prometheus_alert_events
,
start:
issue_minimum_id
,
finish:
issue_maximum_id
)
].
reduce
(:
+
)
end
def
user_minimum_id
...
...
@@ -952,7 +950,7 @@ module Gitlab
csv_issue_imports
=
distinct_count
(
Issues
::
CsvImport
.
where
(
time_period
),
:user_id
)
group_imports
=
distinct_count
(
::
GroupImportState
.
where
(
time_period
),
:user_id
)
project_imports
+
bulk_imports
+
jira_issue_imports
+
csv_issue_imports
+
group_imports
add
(
project_imports
,
bulk_imports
,
jira_issue_imports
,
csv_issue_imports
,
group_imports
)
end
# rubocop:enable CodeReuse/ActiveRecord
...
...
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