debian-mirror-gitlab/doc/administration/monitoring/performance/request_profiling.md

17 lines
929 B
Markdown
Raw Normal View History

2016-11-03 12:29:30 +05:30
# Request Profiling
## Procedure
1. Grab the profiling token from `Monitoring > Requests Profiles` admin page
2019-01-03 12:48:30 +05:30
(highlighted in a blue in the image below).
![Profile token](img/request_profiling_token.png)
1. Pass the header `X-Profile-Token: <token>` to the request you want to profile. You can use any of these tools
* [ModHeader](https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj) Chrome extension
* [Modify Headers](https://addons.mozilla.org/en-US/firefox/addon/modify-headers/) Firefox extension
* `curl --header 'X-Profile-Token: <token>' https://gitlab.example.com/group/project`
2016-11-03 12:29:30 +05:30
1. Once request is finished (which will take a little longer than usual), you can
2019-01-03 12:48:30 +05:30
view the profiling output from `Monitoring > Requests Profiles` admin page.
![Profiling output](img/request_profile_result.png)
2016-11-03 12:29:30 +05:30
## Cleaning up
Profiling output will be cleared out every day via a Sidekiq worker.