Conversation
This reverts commit 06b0370. It seemed to have no impact on parsing, likely because no namespace is used.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request establishes a foundational benchmarking setup for the HTML API using PHPBench. It integrates the benchmarking tool, configures the WordPress environment for benchmark execution, and provides initial performance tests for the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively sets up the infrastructure for benchmarking the HTML API using PHPBench. The changes to composer.json and phpcs.xml.dist are appropriate, and the initial benchmark file for WpHtmlTagProcessor is well-structured. I have a few minor suggestions in phpbench-bootstrap.php to improve error reporting and remove a redundant line of code. I also have a small style suggestion in the benchmark file itself to align with coding standards.
| if ( ! is_readable( $config_file_path ) ) { | ||
| exit( 1 ); | ||
| } |
There was a problem hiding this comment.
For better debugging, it's helpful to output an error message to stderr when the script exits due to a fatal condition. This will make it easier to diagnose setup issues when running the benchmarks.
if ( ! is_readable( $config_file_path ) ) {
fwri te( STDERR, "Error: Could not read the WordPress test configuration file from {$config_file_path}. Aborting.\n" );
exit( 1 );
}| if ( ! is_dir( ABSPATH ) ) { | ||
| exit( 1 ); | ||
| } |
There was a problem hiding this comment.
| define( 'WP_MAX_MEMORY_LIMIT', -1 ); | ||
|
|
||
| $PHP_SELF = '/index.php'; | ||
| $GLOBALS['PHP_SELF'] = '/index.php'; |
| #[Bench\AfterMethods( 'clean_up_processor' )] | ||
| #[Bench\ParamProviders( 'provide_script_tag_contents' )] | ||
| public function bench_javascript_custom_escape( array $params ): void { | ||
| [ $source_text] = $params; |
Trac ticket:
Use of AI Tools
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.