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
43b2e153
Commit
43b2e153
authored
Feb 11, 2021
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'pbar_link' into 'master'"
This reverts merge request !53450
parent
523db65a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
7 additions
and
46 deletions
+7
-46
app/assets/javascripts/performance_bar/components/performance_bar_app.vue
...cripts/performance_bar/components/performance_bar_app.vue
+0
-7
app/assets/javascripts/performance_bar/index.js
app/assets/javascripts/performance_bar/index.js
+0
-2
app/views/peek/_bar.html.haml
app/views/peek/_bar.html.haml
+0
-1
doc/administration/monitoring/performance/performance_bar.md
doc/administration/monitoring/performance/performance_bar.md
+0
-4
lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
...gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
+7
-1
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/features/user_can_display_performance_bar_spec.rb
spec/features/user_can_display_performance_bar_spec.rb
+0
-26
spec/frontend/performance_bar/components/performance_bar_app_spec.js
...nd/performance_bar/components/performance_bar_app_spec.js
+0
-1
spec/frontend/performance_bar/index_spec.js
spec/frontend/performance_bar/index_spec.js
+0
-1
No files found.
app/assets/javascripts/performance_bar/components/performance_bar_app.vue
View file @
43b2e153
...
...
@@ -30,10 +30,6 @@ export default {
type
:
String
,
required
:
true
,
},
statsUrl
:
{
type
:
String
,
required
:
true
,
},
},
detailedMetrics
:
[
{
...
...
@@ -173,9 +169,6 @@ export default {
class=
"ml-auto"
@
change-current-request=
"changeCurrentRequest"
/>
<div
v-if=
"statsUrl"
id=
"peek-stats"
class=
"view"
>
<a
class=
"gl-text-blue-300"
:href=
"statsUrl"
>
{{
s__
(
'
PerformanceBar|Stats
'
)
}}
</a>
</div>
</div>
</div>
</
template
>
app/assets/javascripts/performance_bar/index.js
View file @
43b2e153
...
...
@@ -30,7 +30,6 @@ const initPerformanceBar = (el) => {
requestId
:
performanceBarData
.
requestId
,
peekUrl
:
performanceBarData
.
peekUrl
,
profileUrl
:
performanceBarData
.
profileUrl
,
statsUrl
:
performanceBarData
.
statsUrl
,
};
},
mounted
()
{
...
...
@@ -121,7 +120,6 @@ const initPerformanceBar = (el) => {
requestId
:
this
.
requestId
,
peekUrl
:
this
.
peekUrl
,
profileUrl
:
this
.
profileUrl
,
statsUrl
:
this
.
statsUrl
,
},
on
:
{
'
add-request
'
:
this
.
addRequestManually
,
...
...
app/views/peek/_bar.html.haml
View file @
43b2e153
...
...
@@ -2,6 +2,5 @@
#js-peek
{
data:
{
env:
Peek
.
env
,
request_id:
peek_request_id
,
stats_url:
ENV
.
fetch
(
'GITLAB_PERFORMANCE_BAR_STATS_URL'
,
''
),
peek_url:
"#{peek_routes_path}/results"
},
class:
Peek
.
env
}
doc/administration/monitoring/performance/performance_bar.md
View file @
43b2e153
...
...
@@ -6,8 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Performance Bar **(FREE SELF)**
> The **Stats** field [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/271551) in GitLab SaaS 13.9.
You can display the GitLab Performance Bar to see statistics for the performance
of a page. When activated, it looks as follows:
...
...
@@ -55,8 +53,6 @@ From left to right, it displays:
-
**Request Selector**
: a select box displayed on the right-hand side of the
Performance Bar which enables you to view these metrics for any requests made while
the current page was open. Only the first two requests per unique URL are captured.
-
**Stats**
(optional): if the
`GITLAB_PERFORMANCE_BAR_STATS_URL`
environment variable is set,
this URL is displayed in the bar. In GitLab 13.9 and later, used only in GitLab SaaS.
## Request warnings
...
...
lib/gitlab/performance_bar/redis_adapter_when_peek_enabled.rb
View file @
43b2e153
...
...
@@ -17,7 +17,7 @@ module Gitlab
# to a structured log
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def
enqueue_stats_job
(
request_id
)
return
unless
Feature
.
enabled?
(
:performance_bar_stats
)
return
unless
gather_stats?
@client
.
sadd
(
GitlabPerformanceBarStatsWorker
::
STATS_KEY
,
request_id
)
...
...
@@ -43,6 +43,12 @@ module Gitlab
)
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
def
gather_stats?
return
unless
Feature
.
enabled?
(
:performance_bar_stats
)
Gitlab
.
com?
||
Gitlab
.
staging?
||
!
Rails
.
env
.
production?
end
end
end
end
locale/gitlab.pot
View file @
43b2e153
...
...
@@ -21483,9 +21483,6 @@ msgstr ""
msgid "PerformanceBar|SQL queries"
msgstr ""
msgid "PerformanceBar|Stats"
msgstr ""
msgid "PerformanceBar|trace"
msgstr ""
...
...
spec/features/user_can_display_performance_bar_spec.rb
View file @
43b2e153
...
...
@@ -49,10 +49,6 @@ RSpec.describe 'User can display performance bar', :js do
let
(
:group
)
{
create
(
:group
)
}
before
do
allow
(
GitlabPerformanceBarStatsWorker
).
to
receive
(
:perform_in
)
end
context
'when user is logged-out'
do
before
do
visit
root_path
...
...
@@ -101,28 +97,6 @@ RSpec.describe 'User can display performance bar', :js do
it_behaves_like
'performance bar is enabled by default in development'
it_behaves_like
'performance bar can be displayed'
it
'does not show Stats link by default'
do
find
(
'body'
).
native
.
send_keys
(
'pb'
)
wait_for_requests
expect
(
page
).
not_to
have_link
(
'Stats'
)
end
context
'when GITLAB_PERFORMANCE_BAR_STATS_URL environment variable is set'
do
let
(
:stats_url
)
{
'https://log.gprd.gitlab.net/app/dashboards#/view/'
}
before
do
stub_env
(
'GITLAB_PERFORMANCE_BAR_STATS_URL'
,
stats_url
)
end
it
'shows Stats link'
do
find
(
'body'
).
native
.
send_keys
(
'pb'
)
wait_for_requests
expect
(
page
).
to
have_link
(
'Stats'
,
href:
stats_url
)
end
end
end
end
end
spec/frontend/performance_bar/components/performance_bar_app_spec.js
View file @
43b2e153
...
...
@@ -9,7 +9,6 @@ describe('performance bar app', () => {
store
,
env
:
'
development
'
,
requestId
:
'
123
'
,
statsUrl
:
'
https://log.gprd.gitlab.net/app/dashboards#/view/
'
,
peekUrl
:
'
/-/peek/results
'
,
profileUrl
:
'
?lineprofiler=true
'
,
},
...
...
spec/frontend/performance_bar/index_spec.js
View file @
43b2e153
...
...
@@ -19,7 +19,6 @@ describe('performance bar wrapper', () => {
peekWrapper
.
setAttribute
(
'
data-env
'
,
'
development
'
);
peekWrapper
.
setAttribute
(
'
data-request-id
'
,
'
123
'
);
peekWrapper
.
setAttribute
(
'
data-peek-url
'
,
'
/-/peek/results
'
);
peekWrapper
.
setAttribute
(
'
data-stats-url
'
,
'
https://log.gprd.gitlab.net/app/dashboards#/view/
'
);
peekWrapper
.
setAttribute
(
'
data-profile-url
'
,
'
?lineprofiler=true
'
);
mock
=
new
MockAdapter
(
axios
);
...
...
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