performance_bar.md 5.06 KB
Newer Older
1 2
---
stage: Monitor
3
group: Health
4
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
5 6
---

7
# Performance Bar **(FREE SELF)**
Rémy Coutable's avatar
Rémy Coutable committed
8

9 10
> The **Stats** field [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/271551) in GitLab SaaS 13.9.

Amy Qualls's avatar
Amy Qualls committed
11 12
You can display the GitLab Performance Bar to see statistics for the performance
of a page. When activated, it looks as follows:
Rémy Coutable's avatar
Rémy Coutable committed
13 14 15

![Performance Bar](img/performance_bar.png)

Amy Qualls's avatar
Amy Qualls committed
16
From left to right, it displays:
Rémy Coutable's avatar
Rémy Coutable committed
17

Amy Qualls's avatar
Amy Qualls committed
18 19
- **Current Host**: the current host serving the page.
- **Database queries**: the time taken (in milliseconds) and the total number
20
  of database queries, displayed in the format `00ms / 00 (00 cached) pg`. Click to display
Amy Qualls's avatar
Amy Qualls committed
21
  a modal window with more details:
22
  ![SQL profiling using the Performance Bar](img/performance_bar_sql_queries.png)
Amy Qualls's avatar
Amy Qualls committed
23 24 25
- **Gitaly calls**: the time taken (in milliseconds) and the total number of
  [Gitaly](../../gitaly/index.md) calls. Click to display a modal window with more
  details:
26
  ![Gitaly profiling using the Performance Bar](img/performance_bar_gitaly_calls.png)
Amy Qualls's avatar
Amy Qualls committed
27
- **Rugged calls**: the time taken (in milliseconds) and the total number of
28
  [Rugged](../../nfs.md#improving-nfs-performance-with-gitlab) calls.
Amy Qualls's avatar
Amy Qualls committed
29
  Click to display a modal window with more details:
Stan Hu's avatar
Stan Hu committed
30
  ![Rugged profiling using the Performance Bar](img/performance_bar_rugged_calls.png)
Amy Qualls's avatar
Amy Qualls committed
31 32
- **Redis calls**: the time taken (in milliseconds) and the total number of
  Redis calls. Click to display a modal window with more details:
Stan Hu's avatar
Stan Hu committed
33
  ![Redis profiling using the Performance Bar](img/performance_bar_redis_calls.png)
Amy Qualls's avatar
Amy Qualls committed
34 35
- **Elasticsearch calls**: the time taken (in milliseconds) and the total number of
  Elasticsearch calls. Click to display a modal window with more details.
36 37 38 39
- **External HTTP calls**: the time taken (in milliseconds) and the total
  number of external calls to other systems. Click to display a modal window
  with more details
  ![External call details in the Performance Bar](img/performance_bar_external_http_calls.png)
40 41
- **Load timings** of the page: if your browser supports load timings (Chromium
  and Chrome) several values in milliseconds, separated by slashes.
Amy Qualls's avatar
Amy Qualls committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
  Click to display a modal window with more details. The values, from left to right:
  - **Backend**: time needed for the base page to load.
  - [**First Contentful Paint**](https://web.dev/first-contentful-paint/):
    Time until something was visible to the user.
  - [**DomContentLoaded**](https://developers.google.com/web/fundamentals/performance/critical-rendering-path/measure-crp) Event.
  - **Total number of requests** the page loaded:
    ![Frontend requests using the Performance Bar](img/performance_bar_frontend.png)
- **Trace**: If Jaeger is integrated, **Trace** links to a Jaeger tracing page
  with the current request's `correlation_id` included.
- **+**: A link to add a request's details to the performance bar. The request
  can be added by its full URL (authenticated as the current user), or by the value of
  its `X-Request-Id` header.
- **Download**: a link to download the raw JSON used to generate the Performance Bar reports.
- **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.
58 59
- **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.
60

61 62
## Request warnings

Amy Qualls's avatar
Amy Qualls committed
63 64 65
Requests exceeding predefined limits display a warning **{warning}** icon and
explanation next to the failing metric. In this example, the Gitaly call duration
exceeded the threshold:
66 67 68

![Gitaly call duration exceeded threshold](img/performance_bar_gitaly_threshold.png)

Amy Qualls's avatar
Amy Qualls committed
69 70
If any requests on the current page generated warnings, the warning icon displays
next to the **Request selector**:
71 72 73

![Request selector showing two requests with warnings](img/performance_bar_request_selector_warning.png)

Amy Qualls's avatar
Amy Qualls committed
74
Requests with warnings display `(!)` after their path in the **Request selector**:
75 76 77

![Request selector showing dropdown](img/performance_bar_request_selector_warning_expanded.png)

Marcel Amirault's avatar
Marcel Amirault committed
78
## Enable the Performance Bar via the Admin Area
79

Amy Qualls's avatar
Amy Qualls committed
80
The GitLab Performance Bar is disabled by default. To enable it for a given group:
81

Amy Qualls's avatar
Amy Qualls committed
82
1. Sign in as a user with Administrator [permissions](../../../user/permissions.md).
83
1. In the menu bar, click **Admin Area**.
84
1. Navigate to **Settings > Metrics and profiling**
Amy Qualls's avatar
Amy Qualls committed
85 86 87 88 89 90
   (`admin/application_settings/metrics_and_profiling`), and expand the section
   **Profiling - Performance bar**.
1. Click **Enable access to the Performance Bar**.
1. In the **Allowed group** field, provide the full path of the group allowed
   to access the GitLab Performance Bar.
1. Click **Save changes**.
91

Amy Qualls's avatar
Amy Qualls committed
92
## Keyboard shortcut for the Performance Bar
93

Amy Qualls's avatar
Amy Qualls committed
94 95 96
After enabling the GitLab Performance Bar, press the [<kbd>p</kbd> +
<kbd>b</kbd> keyboard shortcut](../../../user/shortcuts.md) to display it, and
again to hide it.