Skip to content

Add phpbench benchmarks for parsing and analysing - #39

Merged
pavog merged 1 commit into
masterfrom
add-phpbench-benchmarks
Nov 13, 2026
Merged

pavog merged 1 commit into
masterfrom
add-phpbench-benchmarks

Conversation

@pavog

@pavog pavog commented Nov 13, 2026

Copy link
Copy Markdown
Member

There was no way to measure how long parsing or analysing a log takes, so performance changes could only be estimated.

This adds phpbench benchmarks for the PatternParser and PatternAnalyser that run on generated logs.
The logs are generated with a fixed seed, so every run and branch measures the same content without checking large files into the repository.
The analyser benchmark uses up to 20 distinct insight classes because real users register many of them.
The benchmarks are meant to compare a branch against master locally with --tag and --ref.
CI only checks that they still run, because timings on shared runners vary too much for a threshold.

Changes

  • add phpbench as dev dependency with a composer bench script
  • add a deterministic log generator for benchmark input
  • add benchmarks for parsing and analysing
  • add keyword insight classes to analyse with many distinct insights
  • run the benchmarks once in ci as a smoke test
  • document how to compare benchmarks against master

@pavog
pavog merged commit 8e22192 into master Nov 13, 2026
3 checks passed
@pavog
pavog deleted the add-phpbench-benchmarks branch November 13, 2026 11:31
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.

2 participants