Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit 2ea1e55

Browse files
authored
chopin: simplify benchmark to JSON and plaintext only (#10789)
* chopin: simplify benchmark to JSON and plaintext only - Remove all database-related handlers (/db, /queries, /fortunes, /updates, /cached-queries) - Use FastRoute zero-allocation endpoints for /json and /plaintext only - Remove DB dependencies: sea-orm, yarte, rand, serde, bytes - Remove template files and common helpers - Update config to disable database - Remove config.toml (superseded by benchmark_config.json) Follows Chopin tutorial: FastRoute is optimized for static endpoints (~35ns per request). Result: +5-16% JSON throughput, +13-23% plaintext throughput vs Axum. * chopin: add maintainers field to benchmark config * chopin: update to 0.3.4 and implement per-request JSON serialization per TFB spec - Update chopin-core to latest (0.3.4) - Add serde/serde_json dependencies - Implement /json handler with per-request serialization (required by TFB) - Keep /plaintext as FastRoute (allowed by TFB plaintext spec) - Comply with TFB JSON Serialization test requirement xiv: "The serialization to JSON must not be cached; the computational effort to serialize an object to JSON must occur within the scope of handling each request." * chopin: add Server header to /json response (TFB requirement) * chopin: add tracing/tracing-subscriber deps, use FastRoute::json_serialize for /json * chopin: document TFB JSON compliance in code comments * chopin: remove FastRoute (cached headers violate TFB spec), use Axum Router for per-request headers * update version to 0.3.5 * chopin: update to 0.3.5 (per-request headers), use chopin_core imports, remove axum imports * chopin: use FastRoute for both plaintext and JSON (chopin-core 0.3.5 computes headers per-request)
1 parent c146075 commit 2ea1e55

8 files changed

Lines changed: 4879 additions & 0 deletions

File tree

frameworks/Rust/chopin/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/target/
2+
.env
3+
.DS_Store

0 commit comments

Comments
 (0)