stokes

benchmarks

verified in 38ms. 0ns production overhead.

hardware-level verification benchmarks comparing static ast cross-boundary analysis against slow containerized integration suites.

benches/ci_verification_latency.rs (50k loc monorepo)
6,600x faster than e2e docker
stokes static ast contract check (cross-seam)38 ms [p99: 41 ms] · 7.66 ns edge intake
monolingual linters in series (sqlfluff + mypy + cargo)1,840 ms [p99: 2,120 ms] · blind to seams
containerized e2e test suite (docker testcontainers)252,000 ms (4m 12s) · heavy ci resource load
ci check latency
< 38 ms
ast node throughput
124k / sec
proptest battery
10,000 runs
edge intake latency
7.66 ns (runtime)

hardware guarantees

why zero heap allocation matters at the l7 edge.

in edge network proxies processing millions of packets per second, invoking malloc or free on the packet path introduces non-deterministic kernel context switches and memory fragmentation. stokes enforces algorithms that operate strictly in-place on fixed stack buffers.

01

l1d cache line residency

struct FeatureDescriptor is 8 bytes (repr(C, align(8))). 200 descriptors = 1,600 bytes = exactly 25 contiguous cache lines, consuming only 4.8% of 32 KB L1D cache without pointer indirection.

02

defensive bounds validation

stokes verifies that the downstream proxy implements explicit Result<[Feature; 200], PayloadError> bounds checking, rejecting oversized payloads gracefully without worker thread panics.

03

10,000 property fuzz cases

proptest sweeps 10,000 randomized permutations in 1.42s with zero panics across empty sets, descending order, and adversarial duplicate keys.

04

normalized semantic ast lockfile

stokes.lock hashes canonical AST schema signatures, eliminating false positives caused by code formatting or comment updates while strictly catching schema drift.

target/criterion/boundary_verification/report.txt
cross_boundary_ast_scan/50k_loc_workspace
  time:   [37.82 ms 38.12 ms 38.45 ms]
  nodes:  124,210 AST nodes / sec
  mean:   38.10 ms, std dev: 0.28 ms

runtime overhead profile:
  production_proxy_latency:  0.00 ns (zero runtime wrapper)
  heap_allocations:          0 bytes
  l1d_cache_residency:       100.0%

property verification suite:
  proptest::test_feature_bounds:
    runs: 10,000 / 10,000 passed (1.42s)
    shrunk_counterexamples: 0
    panics_encountered: 0
confidence interval:95.0% bootstrap
verification mode:normalized semantic ast
[38 ms CI pass]

sub-second ci gate

verifies cross-language contracts across SQL migrations, Python pipelines, and Rust services before code review.

[0 bytes heap]

zero runtime overhead

operates 100% at compile- and CI-time, adding zero proxy wrappers, zero runtime latency, and zero memory overhead.

[10,000 proptest]

exhaustive edge fuzzing

sweeps 10,000 randomized permutations with adversarial duplicate keys, descending ranks, and empty sets to empirically verify invariant safety.

benchmark faq

benchmarking & memory questions

details on measurement methodology, criterion harnesses, and cache-line residency.

why does stokes benchmark ci verification latency?+
in real engineering workflows, developers cannot afford to wait 5-10 minutes for slow docker-based e2e test suites on every git push. stokes walks the cross-language ast graph (sql, python, rust) in 38ms, providing instant contract verification at commit time.
how does stokes achieve 124,000 ast nodes per second analysis throughput?+
stokes executes native tree-sitter queries in parallel across polyglot files, extracting canonical schema interfaces without full compiler codegen passes. this allows immediate contract checking without spinning up analytical databases or compilers.
why is 32 KB L1D cache residency critical for edge stability?+
each FeatureDescriptor struct is 8 bytes (repr(C, align(8))). 200 descriptors require 1,600 bytes, which fits inside exactly 25 contiguous 64-byte cpu cache lines (occupying less than 5% of a standard 32 KB L1D cache). keeping this hot-set in L1D eliminates ram bus stalls.
what does the 10,000-case property fuzz battery verify?+
stokes runs an automated proptest suite testing adversarial IEEE-754 float vectors, subnormal numbers, quiet NaNs, descending priority orderings, and duplicate keys to empirically verify zero unhandled panics across 10,000 randomized permutations.

ready to eliminate cross-boundary panics?

install stokes to run autonomous cross-compiler verification across ClickHouse, Python, and Rust in your pre-commit hooks and ci pipelines.