NAME
problem48-legacy-parser-benchmark - measure legacy bookmark section validation
PURPOSE
This developer benchmark compares the old linear @LEGACY_KEYS validation with Developer::Dashboard::PageDocument::_parse_legacy_sections. It also compares the returned section data before timing. It is research tooling for Problem 48, not a production command or a release gate.
WHY IT EXISTS
The dashboard test profile attributed substantial exclusive time to legacy section parsing. This tool isolates the key-validation path using generated CODE sections, with the count configurable to show how the former scan scaled.
WHEN TO USE
Run it when changing the legacy parser or comparing candidate key-validation strategies. A large CODE count is a stress workload; it should not be mistaken for a representative user dashboard without a separate workload profile.
HOW TO USE
From the repository root, run:
perl script/problem48-legacy-parser-benchmark
perl script/problem48-legacy-parser-benchmark --codes 10 --runs 9
The default compares 1,001 sections in nine alternating runs and prints exact output-parity status and median parser times. --codes accepts 1 through 5,000. --runs must be a positive odd number.
USED BY
Problem 48 performance investigations and contributors evaluating the legacy bookmark parser.