chore: Organize serialization benchmarks#3151
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3151 +/- ##
=======================================
Coverage 81.33% 81.33%
=======================================
Files 242 242
Lines 46951 46951
Branches 40636 40636
=======================================
Hits 38189 38189
Misses 6769 6769
Partials 1993 1993
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
maximilianruesch
left a comment
There was a problem hiding this comment.
Gotta love some new benchmarks!
There was a problem hiding this comment.
Do I go right in seeing that this change (and the one in subgraph.rs) is largely disconnected from the serialisation changes? If they are completely disconnected, I would prefer them as separate PRs...
There was a problem hiding this comment.
I added the t factory example here. The rest is just renaming the file to a more shared space.
I don't think it's worth splitting a PR just for that (listed it as drive-by in the PR).
| fn bench_serialization(c: &mut Criterion) { | ||
| bench_hugr(c, "t_factory", &t_factory()); | ||
| bench_hugr(c, "simple_cfg", &simple_cfg_hugr()); | ||
|
|
||
| for byte_size in [1024, 1024 * 1024] { | ||
| bench_hugr(c, &format!("big_hugr/{byte_size}"), &big_hugr(byte_size)); | ||
| } | ||
| } |
There was a problem hiding this comment.
What happened to the circuit based benchmarks?
There was a problem hiding this comment.
I removed it, to balance a bit the number of new benchmars (this PR bumps the count from 33 to 45. The circuit ones would be 20 more.
The original idea for that test case was to see the asymptotic time grow for similar circuits of different sizes. Unfortunately codspeed doesn't have a way to visualize that nicely, so I don't think it was a good tradeoff against the extra CI time.
Cleans up the serialization benchmarks
Moves the serialization-specific benchmarks from
::benchmarks::hugrto a new::benchmarks::serializationmodule.Drops benchmarks for deprecated json format
Adds SExpression envelope benchmarks
Disables zstd in the model encoding benchmarks
Adds benchmarks for the envelope formats without the extra extension encoding.
Adds a real-world
t_factoryexample hugr, in addition to the syntetic ones.drive-by: Moves the common example hugrs from
benchmarks::hugr::examplesto::examples.