doc/administration/monitoring/performance/performance_bar.md
{{< details >}}
{{< /details >}}
The performance bar displays real-time metrics directly in your browser, giving you insights without making you look through logs or run separate profiling tools.
For development teams, the performance bar simplifies debugging by showing exactly where they should focus their efforts.
{{< history >}}
{{< /history >}}
From left to right, the performance bar displays:
00ms / 00 (00 cached) pg. Select to display
a dialog with more details. You can use this to see the following
details for each query:
NaN if your browser does not
support this feature.correlation_id included.X-Request-Id header.10100 microseconds.10100 microseconds.100 allocations.GITLAB_PERFORMANCE_BAR_STATS_URL environment variable is set,
this URL is displayed in the bar. Used only on GitLab.com.[!note] Not all indicators are available in all environments. For instance, the memory view requires running Ruby with specific patches applied. When running GitLab locally using the GDK, this is typically not the case and the memory view cannot be used.
Press the <kbd>p</kbd> + <kbd>b</kbd> keyboard shortcut to display the performance bar, and again to hide it.
For non-administrators to display the performance bar, it must be enabled for them.
Requests that exceed predefined limits display a warning {{< icon name="warning" >}} icon and explanation next to the metric. In this example, the Gitaly call duration exceeded the threshold.
Each warning message follows the format:
<metric> <type>: <actual> over <threshold>
For example, es calls: 83 over 5 shows 83 Elasticsearch calls,
which exceeds the threshold of five.
Three threshold types can trigger a warning:
calls: The total number of calls made to the service during the request.duration: The total time in milliseconds spent across all calls to the service.individual call: The time in milliseconds for a single call to the service.
Individual call warnings appear in the detail dialog for that metric, not in the bar itself.The following metrics emit warnings when a request exceeds their thresholds.
Thresholds differ between production and all other environments. The values labeled (development)
in the table apply to every non-production environment, such as development and test.
The values shown here reflect the defaults defined in the source files under
lib/peek/views/.
| Metric | Warning label prefix | Calls threshold | Total duration threshold | Individual call threshold |
|---|---|---|---|---|
| Database (SQL) | active-record | 100 | 3,000 ms (development) / 15,000 ms (production) | 1,000 ms (development) / 5,000 ms (production) |
| Gitaly | gitaly | 30 | 1,000 ms | 500 ms |
| Elasticsearch | es | 5 | 1,000 ms | 1,000 ms |
| External HTTP | external-http | 10 | 1,000 ms | 100 ms |
| ClickHouse | ch | 5 | 1,000 ms | 1,000 ms |
| Zoekt | zkt | 3 (development) / 5 (production) | 500 ms (development) / 1,000 ms (production) | 500 ms (development) / 1,000 ms (production) |
The performance bar tracks and displays Redis calls but does not define thresholds for them, so it emits no warnings for Redis.
The Bullet metric is an exception to the format above. Bullet detects N+1 queries and runs
by default in the development environment only. When active, it emits a fixed
Unoptimized queries detected warning instead of a threshold-based
<metric> <type>: <actual> over <threshold> message.
The production thresholds for the database metric are higher than the development defaults because production queries often take longer against larger data volumes. All other metrics except Zoekt use the same thresholds across environments. These values are configurable defaults defined in the source files. If the thresholds change, the source files are the authoritative reference.
A warning indicates that a request uses more resources than expected for typical pages. Use the following guidance to decide whether to investigate:
gitaly calls: 45 over 30) often indicates an N+1 pattern
where the same type of call repeats in a loop. Select the metric to open the detail
dialog and look for repeated calls with similar parameters.active-record duration: 4500 over 3000) means the service
is slow overall. Check whether a small number of expensive calls are responsible, or whether
many small calls accumulate.Some warnings are expected noise in specific contexts:
The performance bar is disabled by default for non-administrators. To enable it for a given group: