Repository navigation
Description
Status (checked on main at f42ea37, 2026-11-14)
The JSON-LD part is covered by fluree-db-api/benches/jsonld_parse.rs (894f03d), a parse-only JSON-LD transaction bench. The parse-only Turtle and SPARQL benches are still missing.
Original description
Context
Follow-up bench from PR #1228 review (coverage gap #8). Turtle, JSON-LD, and SPARQL parser hot paths are exercised through import_bulk and transact_commit end-to-end, but never isolated. A regression in any of these parsers would surface here only as a small percentage of query_hot_bsbm setup or import_bulk time, where it's easy to mistake for noise.
Scope
Add fluree-db-query/benches/parser_micro.rs (or split into three files if that's cleaner — parser_turtle.rs, parser_jsonld.rs, parser_sparql.rs):
- Turtle parser: parse a
gen::people-generated Turtle blob atTiny/Smallscales. Measure throughput in triples/sec (parse-only — no Fluree state). - JSON-LD parser: parse a
gen::peopleJSON-LD@graphdocument. Same metric. - SPARQL parser: parse the BSBM Q3/Q5/Q9 strings from
query_hot_bsbm.rsplus a few longer-shape queries (UNION + OPTIONAL + property paths). Measure throughput in queries/sec.
Each:
- Use the chassis pattern.
current_profile(),current_scale(),init_tracing_for_bench(). No tokio runtime needed for pure parsing —bench_runtime()is unnecessary here. - No Fluree state. This is parser-only, no need to build a
Fluree. - Register budgets in
regression-budget.json. Tighter budgets here are appropriate since parsing is deterministic and CPU-bound.
Acceptance
- Bench(es) compile and run
--testgreen attiny. -
regression-budget.jsonhas entries. -
BENCHMARKING.md's "Current benches" table grows one or three rows depending on the file split. - Bench-gate CI job picks them up.
References
- PR Workspace-Wide Benchmarking Foundation #1228 review: coverage gap Fix browser cljs build #8.
- Parser locations:
fluree-graph-turtle,fluree-graph-json-ld,fluree-db-sparql/src/parse/.
Out of scope
This is parse-only. Round-trip serialization correctness is owned by existing tests; this bench isolates parser perf.
Activity
address PR review feedback (1228): fix vector_math determinism, retro…