summaryrefslogtreecommitdiff
path: root/lib/gitlab/performance_bar.rb
Commit message (Collapse)AuthorAgeFilesLines
* Always allow the performance bar to be enabled for adminsrs-performance-bar-for-adminsRobert Speicher2018-04-021-0/+1
|
* use Gitlab::UserSettings directly as a singleton instead of ↵Mario de la Ossa2018-02-021-3/+1
| | | | including/extending it
* In development, allow the toggling of the performance barRémy Coutable2018-01-171-0/+1
| | | | | | The performance bar is still displayed by default in development. Signed-off-by: Rémy Coutable <remy@rymai.me>
* `current_application_settings` belongs on `Gitlab::CurrentSettings`Sean McGivern2017-08-311-1/+1
| | | | | | | | | | | | | | | | The initializers including this were doing so at the top level, so every object loaded after them had a `current_application_settings` method. However, if someone had rack-attack enabled (which was loaded before these initializers), it would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't have that method. To fix this: 1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need `Object.new.current_application_settings` to work. 2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it like that in several places. 3. Change the initializers to use that new form.
* Expire cached user IDs that can see the performance after 5 minutesRémy Coutable2017-07-171-2/+3
| | | | | | | | If we don't expire the cached user IDs, the list of IDs would become outdated when a new member is added, or when a member ios removed from the allowed group. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Don't use Flipper for the Performance BarRémy Coutable2017-07-071-10/+3
| | | | | | | The implementation now simply rely on the `performance_bar_allowed_group_id` Application Setting. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Allow to enable the Performance Bar for a group from the admin areaRémy Coutable2017-07-061-8/+10
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use Rails.cache instead of Redis directlyRémy Coutable2017-07-061-22/+7
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Cache the allowed user IDs for the performance bar, in Redis for 10 minutesRémy Coutable2017-07-061-17/+35
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Improve feature flag check for the performance barRémy Coutable2017-07-061-2/+2
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Hide 'peek' by using 'performance bar' insteadRémy Coutable2017-07-061-8/+5
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Cache PerformanceBar data using RequestStoreRémy Coutable2017-07-061-7/+22
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Allow to enable the performance bar per user or Flipper groupRémy Coutable2017-07-061-2/+18
| | | | | | | | A `performance_team` Flipper group has been created. By default this group is nil but this can be customized in `gitlab.yml` via the performance_bar.allowed_group setting. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix spec failures and add a feature flag for the performance barRémy Coutable2017-06-091-1/+1
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* New performance bar that can be enabled with the `p b` shortcutRémy Coutable2017-06-091-0/+7
Signed-off-by: Rémy Coutable <remy@rymai.me>