Add --plugin grouping to wp profile hook resource output#220
Draft
Copilot wants to merge 4 commits into
Draft
Conversation
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add table of plugin resource usage with --plugin
Add May 28, 2026
--plugin grouping to wp profile hook resource output
swissspidy
reviewed
May 28, 2026
| } | ||
| add_action( 'init', 'resource_test_init_callback' ); | ||
| """ | ||
| And I run `wp plugin activate resource-test` |
Member
There was a problem hiding this comment.
@copilot to make this work, you need to install wp-cli/extension-command as a composer development dependency.
Contributor
Author
There was a problem hiding this comment.
Implemented in 9aa3a6d: added wp-cli/extension-command to require-dev in composer.json so Behat scenarios can use wp plugin ... commands.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
wp profilecould not report resource usage at plugin granularity when profiling hooks. This change adds a plugin-level view so callback metrics can be aggregated per plugin via a first-class CLI flag.Hook command surface
--plugintowp profile hookoptions.README.md, feature usage output) to include the new flag.Plugin-level aggregation
Command::hook()to aggregate callback metrics by plugin when--pluginis set.time, query/cache/request counters and durations, and computes aggregatecache_ratio.location.Behavior constraints
--pluginis only valid when profiling callbacks (wp profile hook <hook>or--all).Acceptance coverage
init.Example output shape: