Skip to content

Update native extension benchmark data#410

Merged
adamziel merged 1 commit into
gh-pagesfrom
adamziel/update-native-benchmark
May 26, 2026
Merged

Update native extension benchmark data#410
adamziel merged 1 commit into
gh-pagesfrom
adamziel/update-native-benchmark

Conversation

@adamziel
Copy link
Copy Markdown
Collaborator

Summary

  • update the published native extension benchmark JSON with the self-review rerun
  • include native parser results now that the parser benchmark loads through the integration loader

Testing

  • php packages/mysql-on-sqlite/tests/tools/run-lexer-benchmark.php --json
  • php packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php --json
  • php -d extension=/absolute/path/to/libwp_mysql_parser.dylib packages/mysql-on-sqlite/tests/tools/run-native-extension-benchmark.php --json
  • php -d extension=/absolute/path/to/libwp_mysql_parser.dylib packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php --json

@adamziel adamziel merged commit a24dfd4 into gh-pages May 26, 2026
@adamziel adamziel deleted the adamziel/update-native-benchmark branch May 26, 2026 21:39
adamziel added a commit that referenced this pull request May 26, 2026
## What changed

Reorganizes the root README so Quick start stays first and the optional
Native MySQL Parser Extension is discoverable without taking over the
landing flow. The README links to the GitHub Pages landing page with the
published WASM release list, manifest links, “Run in Playground”
buttons, and native extension details.

Also expands `packages/php-ext-wp-mysql-parser/README.md` with local
build/load instructions, WASM artifact details, checksum verification
steps, and benchmark commands. The benchmark scripts now run cleanly on
PHP 8.4+, can emit JSON, report exact processed counts, and the parser
benchmark goes through the integration loader so `php -d extension=...`
measures the native parser path instead of accidentally staying on the
pure-PHP classes.

## Why

The native extension and WASM artifacts were hard to discover. This
keeps the normal README quick start prominent while giving users a clear
path to optional native-extension docs, Playground links, and
reproducible benchmark commands.

## Self-review fixes

- Fixed benchmark query counts to use an explicit processed counter
instead of loop-index arithmetic.
- Fixed `run-parser-benchmark.php` to include the first query and to
load through `src/load.php`, matching runtime native-vs-PHP class
selection.
- Tightened docs so build commands do not leave readers in the package
directory before repository-root verification commands.
- Added checksum verification commands and refreshed benchmark numbers,
including native parser results.

## Related Pages work

- GitHub Pages native-extension demo: #408 (merged)
- GitHub Pages release list + Playground CLI instructions: #409 (merged)
- GitHub Pages benchmark refresh: #410 (merged)
- Published page:
https://wordpress.github.io/sqlite-database-integration/

## Validation

- `composer validate --no-check-all`
- `php -l packages/mysql-on-sqlite/tests/tools/run-lexer-benchmark.php`
- `php -l packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php`
- `php -l
packages/mysql-on-sqlite/tests/tools/run-native-extension-benchmark.php`
- `php packages/mysql-on-sqlite/tests/tools/run-lexer-benchmark.php
--json --limit=100`
- `php packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php
--json --limit=100`
- `php
packages/mysql-on-sqlite/tests/tools/run-native-extension-benchmark.php
--json --limit=100`
- `php -d extension=/path/to/libwp_mysql_parser.dylib
packages/mysql-on-sqlite/tests/tools/run-native-extension-benchmark.php
--json --limit=100`
- `php -d extension=/path/to/libwp_mysql_parser.dylib
packages/mysql-on-sqlite/tests/tools/run-parser-benchmark.php --json
--limit=100`
- Full benchmark rerun for published numbers: lexer PHP, parser PHP,
native lexer, native parser.
- `npx @wp-playground/cli@latest run-blueprint --php=8.4
--php-extension=https://wordpress.github.io/sqlite-database-integration/wp_mysql_parser-wasm-extension/latest/manifest.json
--blueprint=https://wordpress.github.io/sqlite-database-integration/native-extension/blueprint.json
--verbosity=quiet`

Note: `composer run check-cs` could not run in this workspace because
`vendor/bin/phpcs` is not installed locally; CI runs it with
dependencies installed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant