Consolidate benchmarks to one (the website tables); remove the rest#53
Merged
Conversation
Delete the old src/Examples (GenHTTP/ServerTest demos) and remove them from src/Glyph11.sln. Add a root Examples/ with a runnable, fully-commented console app per package, each covering every option: - Glyph11.Example — contiguous + multi-segment parse, custom limits, reading fields/headers/query, chunked decode, error handling, reuse/dispose - Glyph11.Native.Example — span + ReadOnlySequence (scratch + out parsed) parse, pooled storage, status codes / HTTP mapping, chunked decode, ABI - Glyph11.Pico.Example — memory + sequence parse, chunked via ChunkedBodyStream, the validation trade-off Verified all three compile and run (managed needs no native; native/pico run against a locally-built core via GLYPH11_NATIVE_PATH / GLYPH11_PICO_NATIVE_PATH). Examples/README.md explains running each.
release.yml only packed src/ (Glyph11). Make it publish all three at their csproj versions: keep the managed pack as a job, and call package-native.yml / package-pico.yml as reusable workflows (with publish: true, secrets: inherit) so one dispatch runs the native build matrices and pushes Native + Pico too. - package-native/pico: add a workflow_call trigger; publish job now also fires when called; version uses the csproj <Version> on a real publish (tag still wins; PRs stay throwaway CI prereleases). --skip-duplicate keeps re-runs safe.
Put the examples in the solution for IDE convenience. Mark them IsPackable=false / IsPublishable=false so the Release pack (which packs the src solution) never turns them into NuGets, and keep the Glyph11.Native/Glyph11.Pico projects OUT of the solution (dotnet sln add pulls them in as references) — otherwise the managed Release job would pack them without their native binaries. Verified: packing the solution produces only Glyph11.0.3.5.nupkg; the examples still build via their ProjectReferences.
…port) GenHTTP wasn't only a demo — Benchmarks and Tests ProjectReference it and use its types (Request, RequestMethod) to exercise FlexibleParser. Deleting src/Examples broke their references. The Glyph11 package itself never uses GenHTTP, so move it to tests/GenHTTP (test/bench support) and re-point: - GenHTTP -> ..\..\src\Glyph11 - Benchmarks -> ..\tests\GenHTTP ; Tests -> ..\GenHTTP - add tests/GenHTTP to src/Glyph11.sln (it's IsPackable=false, so Release still packs only Glyph11) Build succeeds; all 366 tests pass.
GenHTTP's Request was only a wrapper whose .Source is a BinaryRequest, so the FlexibleParser benchmarks and tests now target BinaryRequest directly (Reset -> Clear, .Source dropped) — same coverage, no GenHTTP. Deleted tests/GenHTTP, removed it from the solution and both ProjectReferences, and swapped the incidental 'GenHTTP' server-name string in test payloads for 'Glyph11' (same length, offsets unchanged). Build succeeds; all 366 tests pass; no GenHTTP references remain.
There were four overlapping benchmark setups (/bench cross-language scripts, /Benchmarks BDN, core/bench C, Glyph11.Bench FFI) plus a Kotlin bench mode, and none produced the site's current tables. Replace them with a single self-contained Benchmarks/ console app that reproduces exactly what the docs site shows: the three packages (Glyph11, Glyph11.Native, Glyph11.Pico) on contiguous + multi-segment request parsing and chunked decoding, best-of-5, payloads built in-process. Removed: - bench/ (run-all.sh, gen_payloads.py, aggregate.py, results) - core/bench/ + the GLYPH11_BUILD_BENCH CMake option - bindings/dotnet/Glyph11.Bench/ - the Kotlin bench (Main.kt dispatch/fn, Glyph11.kt benchParse/benchChunked/chunkDecodeHandle) - benchmark.yml (the BenchmarkDotNet PR regression-alert CI) and its BDN artifacts - the FlexibleParser/UltraHardened BDN benchmarks Verified: the new benchmark reproduces the site numbers; the solution builds and packs only Glyph11; the Kotlin binding still compiles.
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.
The repo had four overlapping benchmark setups plus a Kotlin bench mode — and confusingly, none of them produced the tables the docs site currently shows (those came from ad-hoc runs). This consolidates to one.
Kept: one self-contained benchmark
Benchmarks/is now a single console app that reproduces exactly what the site shows — the three packages (Glyph11, Glyph11.Native, Glyph11.Pico) on:best-of-5, payloads built in-process (identical bytes to the site).
README.mdexplains how to run it (the native packages need their libs on the load path; Glyph11 needs nothing). Verified the numbers match the site within run-to-run noise.Removed
bench/— the cross-language scripts (run-all.sh,gen_payloads.py,aggregate.py, results)core/bench/+ theGLYPH11_BUILD_BENCHCMake optionbindings/dotnet/Glyph11.Bench/Main.ktdispatch/function,Glyph11.ktbenchParse/benchChunked/chunkDecodeHandle)benchmark.yml— the BenchmarkDotNet PR regression-alert CI — and its BDN artifactsFlexibleParser/UltraHardenedBDN benchmarks(Per your choice: simple best-of-5, no CI.)
Verified
dotnet buildsucceeds; packing the solution still produces onlyGlyph11(the benchmark isIsPackable=false; the bindings stay out of the solution).Branches on top of #52, so until that merges this diff also shows #52's commits.