Repository navigation
Ziplex: add benchmark CI job with HTML report - #192
Open
samuelchassot wants to merge 45 commits into
Open
samuelchassot wants to merge 45 commits into
samuelchassot wants to merge 45 commits into
Conversation
# Conflicts: # lexers/regex/.DS_Store # lexers/regex/ziplex/src/main/scala/com/ziplex/lexer/LexerInterface.scala # lexers/regex/ziplex/src/main/scala/com/ziplex/lexer/Main.scala # lexers/regex/ziplex/src/main/scala/com/ziplex/lexer/VerifiedLexer.scala # lexers/regex/ziplex/src/main/scala/com/ziplex/lexer/VerifiedRegex.scala # lexers/regex/ziplex/stainless.conf # lexers/regex/ziplex/verify.sh
- run_benchmarks_ci.sh: time-boxed selection of the benchmarks (about 2h15): Clément's regex patterns with and without ranges, zipper matcher against derivatives and scala.util.matching.Regex, V3 memoized lexer against Silex and flex. Parametric on the Stainless version (release x.y.z, or main built from the sources); installs flex and hyperfine when they are missing. - switch_imports.py: switch the sources between verification and benchmarking imports. - generate_benchmark_report.py: self-contained HTML report and Markdown summary, including the Coqlex reference results. - ziplex-benchmarks.yml: manually triggered workflow on the self-hosted runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a manually triggered CI job that runs a time-boxed selection of the Ziplex benchmarks and produces a self-contained HTML report, in the same spirit as the mutablemaps benchmark job (#191).
Stacked on
sam/characterDescriptors: the regex benchmarks with ranges come from that branch.What is measured
scala.util.matching.Regex.Lexer.lexMem) against Silex onaanda*b, JSON and Amy.aanda*b, timed with hyperfine.benchmark_results/from_coqlex. It is not measured by the job and comes from another machine.What is added
.github/workflows/ziplex-benchmarks.yml:workflow_dispatchjob on the self-hosted runner, with two inputs:profile:standard(about 2h15) orsmoke(about 10 minutes, checks the pipeline, not the numbers).stainless:mainby default (cloned and built from the sources), or a releasex.y.z.The report, the JMH JSON results and the logs are uploaded as the
ziplex-benchmarksartifact, and a summary table is written to the job page.lexers/regex/ziplex/run_benchmarks_ci.sh: compiles once, then runs each benchmark group with JMH. Results of the groups that finished are kept if another one fails.lexers/regex/ziplex/switch_imports.py: switches the sources between the verification imports and the benchmarking imports. The benchmark script restores the verification imports when it finishes.lexers/regex/ziplex/benchmark_results/generate_benchmark_report.py: builds the HTML report and the Markdown summary (Python standard library only).README.md: a section describing the above.Notes
AbstractMethodBody, which is only on Stainless main (not in 0.10.5), hence themaindefault. With an older release, the script adds an equivalent definition at compile time, fromtarget/, without touching the sources.flex,gccandhyperfinewhen they are missing, using the package manager as root or with password-lesssudo. If it cannot, the flex comparison is skipped and reported as such.INSTALL_MISSING_TOOLS=0disables the install.Testing
standardrun locally with Stainless 0.10.5: 2h16, all six JMH groups passed.smokeruns against Stainlessmain(built from sources at566e008) and against 0.10.5.standardrun has not been timed with the Stainlessmainbuild included (about 10 extra minutes expected).