Review `gitlab-profiler` and take action
@stanhu
created gitlab-profiler a while ago, but according to the developer tooling survey it seems unused. Additional comments from @stanhu
:
I created gitlab-profiler a while ago, but it's not as convenient now that we have the performance bar so we can consider archiving this project.
We should check whether the Performance Bar and Gitlab::Profiler
can completely replace gitlab-profiler and if so, whether we can archive it.
profile_url.rb
is available in the main rails app (for instances >= 10.5). So we only should have to look at gitlab_profiler.rb
What does it do?
From the readme:
gitlab-profiler currently exposes a multi-URL profiler
gitlab_profiler.rb
, which can be configured to monitor multiple URLs and store the data. The multi-URL profiler does the following:
- Profiles a set URLs directly on a GitLab installation under ruby-prof using
bin/profile-url
in the GitLab installation.- Generates the ruby-prof call stack data into a HTML file.
- Log the SQL timing data into a separate file.
- Upload the HTML and timing data into S3.
- Log the results into a PostgreSQL database.
The data from bin/profile-url
is still available, because the profile-url
has been added to the main GitLab project. We also offer a flamegraph with the performance bar. The performance bar currently offers all SQL queries a page makes (split by different calls via the dropdown), and you can sort them chronologically and by duration.
We don't currently upload the HTML and timing data into S3 automatically and log the results into a PostgreSQL database, but that is because we will have the results available immediately anyway.
gitlab-profiler
has some requirements that the performance bar does not have as well: https://gitlab.com/gitlab-com/gitlab-profiler#requirements
The advantages of gitlab-profiler are that you can add multiple URLs to profile, and it saves the data in S3. Although I have no clue how we (gitlab team members) can access this data
Overall it seems we don't need to support gitlab-profiler anymore, as we can get the same data from the performance bar and the bin/profile-url
script, with easier access and it's more readily available to all team members.
Documentation about gitlab-profiler
:
One line in https://docs.gitlab.com/ee/development/profiling.html
A mention in https://about.gitlab.com/handbook/engineering/monitoring/#web-requests with a dead link