Feature request: Ability to profile any page on demand

Created on 12 June 2024, 6 months ago
Updated 13 June 2024, 6 months ago

Problem/Motivation

I would like to propose a new feature, to allow profiling any page on demand.
This could be implemented by using xhprof_secret in the query string.
To avoid anyone from bringing the site down, the query string must match the value stored in settings.

On demand should take precedence over the configurations to exclude certain pages and the profiling interval.

Proposed resolution

Update the code in getEnabled to also check Drupal setting `xhprof_secret`, if the query string xhprof_secret=foo matches the value in Drupal settings, we enable profiling for that request.

Remaining tasks

- Add tests
- Update the documentation

User interface changes

The form will contain an input element with instructions on how this works and the value in Drupal settings, if that is set.

API changes

We will need to inject Drupal settings into the form and the Event subscriber.

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom marcelovani London

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024