Skip to content

Add Criterion benchmarks for public scraping APIs - #13

Merged
egorsmkv merged 1 commit into
masterfrom
bench/criterion-public-api
Oct 8, 2026
Merged

egorsmkv merged 1 commit into
masterfrom
bench/criterion-public-api

Conversation

@egorsmkv

@egorsmkv egorsmkv commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Adds a separate Criterion 0.8.2 suite for request building/cloning, UTF-8 and Windows-1252 decoding, fresh and warm CSS selection, optional compiled/string XPath, invalid CSS, and relative URL following. Deterministic bounded fixtures and correctness assertions outside timing cover 23 default workloads and 29 with XPath. Existing custom harnesses and library behavior are preserved.

Documents timing boundaries, feature-dependent DOM caching, XML-compatible XPath fixtures, and reproducible baseline comparisons. Criterion's minimum Rust version (1.86) is below the project's 1.92 MSRV; existing dependency versions are preserved.

Validation:

  • cargo fmt --all --check and git diff --check passed.
  • cargo check --all-targets passed.
  • cargo test --all: 124 tests passed.
  • cargo test -p silkworm-rs --bench criterion_api: all 23 workloads passed.
  • Release compilation and Criterion --test with --features xpath: all 29 workloads passed.
  • One normal 100-sample builder run produced 277.82 ns, 95% CI [275.34, 280.28] ns. This is a shared-host initial measurement, not a before/after performance claim; the full suite was smoke-tested, not fully measured.

The GitHub commit reproduces the exact source tree of local commit d9d8436; its SHA differs because it was published through the GitHub connector. Generated reports and build artifacts are excluded.

@egorsmkv
egorsmkv merged commit a491f11 into master Oct 8, 2026
2 checks passed
@egorsmkv
egorsmkv deleted the bench/criterion-public-api branch October 8, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant