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
9aca70bd
Commit
9aca70bd
authored
Oct 07, 2021
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup in processing performance stats
parent
c2e6f5c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
lib/gitlab/performance_bar/stats.rb
lib/gitlab/performance_bar/stats.rb
+3
-5
No files found.
lib/gitlab/performance_bar/stats.rb
View file @
9aca70bd
...
...
@@ -37,9 +37,7 @@ module Gitlab
end
def
log_queries
(
id
,
data
,
type
)
json_path
=
[
'data'
,
type
,
'details'
]
queries_by_location
(
data
,
json_path
).
each
do
|
location
,
queries
|
queries_by_location
(
data
,
type
).
each
do
|
location
,
queries
|
next
unless
location
duration
=
queries
.
sum
{
|
query
|
query
[
'duration'
].
to_f
}
...
...
@@ -56,8 +54,8 @@ module Gitlab
end
end
def
queries_by_location
(
data
,
path
)
return
[]
unless
queries
=
data
.
dig
(
*
path
)
def
queries_by_location
(
data
,
type
)
return
[]
unless
queries
=
data
.
dig
(
'data'
,
type
,
'details'
)
queries
.
group_by
do
|
query
|
parse_backtrace
(
query
[
'backtrace'
])
...
...
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