Built in profiling capabilities with excimer #52099
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds simple profiling capabilities that can be turned on with config.php options. This is similar to what sentry already offers but in most setups that need debugging installing sentry is not something that can be achieved on short notice.
Blackfire can already be used but requires a subscription and can not sample without an extra plan.
It has two operation modes:
This can be either enabled for all requests (very heavy) or when sending a configured secret along the request. The files are stored using the date and request id to find them more easily.
The request will be sampled to a file that can be rotated in a custom amount of time (e.g. every hour or every 5 minutes)
The files will be just written to a configurable path (/tmp by default)
Just a quick implementation for now, this could become more sophisticated, but I used this a couple of times already as a code dump in config.php and it is really useful
https://github.com/jlfwong/speedscope can be used to plot colorful graphs