From 040eeb1039b4298ea56a670a0a4ae511288806d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 6 Jul 2017 18:57:02 +0200 Subject: Allow to enable the Performance Bar for a group from the admin area MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- .../img/performance_bar_configuration_settings.png | Bin 0 -> 20385 bytes .../monitoring/performance/performance_bar.md | 50 +++++++++++---------- 2 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 doc/administration/monitoring/performance/img/performance_bar_configuration_settings.png (limited to 'doc') diff --git a/doc/administration/monitoring/performance/img/performance_bar_configuration_settings.png b/doc/administration/monitoring/performance/img/performance_bar_configuration_settings.png new file mode 100644 index 00000000000..2d64ef8c5fc Binary files /dev/null and b/doc/administration/monitoring/performance/img/performance_bar_configuration_settings.png differ diff --git a/doc/administration/monitoring/performance/performance_bar.md b/doc/administration/monitoring/performance/performance_bar.md index 409a74d2f91..6ee21eae194 100644 --- a/doc/administration/monitoring/performance/performance_bar.md +++ b/doc/administration/monitoring/performance/performance_bar.md @@ -1,9 +1,5 @@ # Performance Bar ->**Note:** -Available since GitLab 9.4. For installations from source you'll have to -configure it yourself. - A Performance Bar can be displayed, to dig into the performance of a page. When activated, it looks as follows: @@ -21,38 +17,44 @@ It allows you to: - profile the code used to generate the page, line by line ![Line profiling using the Performance Bar](img/performance_bar_line_profiling.png) -## Enable the Performance Bar +## Enable the Performance Bar via the Admin panel + +GitLab Performance Bar is disabled by default. To enable it for a given group, +navigate to the Admin area in **Settings > Profiling - Performance Bar** +(`/admin/application_settings`). + +The only required setting you need to set is the full path of the group that +will be allowed to display the Performance Bar. +Make sure _Enable the Performance Bar_ is checked and hit +**Save** to save the changes. + +--- + +![GitLab Performance Bar Admin Settings](img/performance_bar_configuration_settings.png) -By default, the Performance Bar is disabled. You can enable it for a group -and/or users. Note that it's possible to enable it for a group and for -individual users at the same time. +--- -1. Edit `/etc/gitlab/gitlab.rb` -1. Find the following line, and set it to the group's **full path** that should -be allowed to use the Performance Bar: +## Enable the Performance Bar via the API - ```ruby - gitlab_rails['performance_bar_allowed_group'] = 'your-org/your-performance-group' - ``` +Under the hood, the Performance Bar activation is done via the `performance_bar` +[Feature Flag](../../../development/features_flags.md). -1. Save the file and [reconfigure GitLab][reconfigure] for the changes to - take effect -1. The Performance Bar can then be enabled via the - [Features API](../../../api/features.md#set-or-create-a-feature) (see below). +That means you can also enable or disable it via the +[Features API](../../../api/features.md#set-or-create-a-feature). -### Enable for the `performance_team` feature group +### For the `performance_team` feature group -The `performance_team` feature group maps to the group specified by the -`performance_bar_allowed_group` setting you've set in the previous step. +The `performance_team` feature group maps to the group specified in your [Admin +area](#enable-the-performance-bar-via-the-admin-panel). ``` curl --data "feature_group=performance_team" --data "value=true" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/features/performance_bar ``` -### Enable for specific users +### For specific users -It's possible to enable the Performance Bar for specific users in addition to a -group, or even instead of a group: +It's also possible to enable the Performance Bar for specific users in addition +to a group, or even instead of a group: ``` curl --data "user=my_username" --data "value=true" --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/features/performance_bar -- cgit v1.2.1