Skip to content

Add Laravel corpus wall-clock benchmark + CI - #2

Merged
TomasVotruba merged 3 commits into
mainfrom
tv-corpus-benchmark
Sep 3, 2026
Merged

Add Laravel corpus wall-clock benchmark + CI#2
TomasVotruba merged 3 commits into
mainfrom
tv-corpus-benchmark

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Adds a corpus benchmark similar to the one in the php-parser-speed-comparison repo, self-contained here.

What

  • benchmark/ — a small package main that walks a directory, parses every .php file with this parser, and prints parsed N files in M ms. Uses only stdlib (no new dependencies); broken fixtures are skipped since parse errors are ignored (the parse work is what's timed).
  • make bench-corpus DIR=./laravel — local runner.
  • .github/workflows/benchmark.yaml — clones a full Laravel framework checkout (src/ + Composer vendor/), builds the benchmark, runs it 5 times, and reports the average wall-clock and peak memory to the run Summary. Triggers on push, PR, and every 12h.
  • README gains a Benchmark section.

Notes

  • The corpus prep (clone + composer install + prune tests dirs) mirrors the comparison repo, so numbers are comparable.
  • Verified locally: 2966 files, ~1215 ms; golangci-lint clean, gofmt -s clean, go vet clean.

@TomasVotruba
TomasVotruba merged commit 208de2c into main Sep 3, 2026
5 checks passed
@TomasVotruba
TomasVotruba deleted the tv-corpus-benchmark branch September 3, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant