Skip to content

test(perf): add Criterion microbenchmarks and expanded wrk scenarios #110

Description

@ZhuchkaTriplesix

Context

Problem

Optimizations cannot be proven or guarded without repeatable microbenchmarks and expanded scenario coverage.

Proposed change

  1. Add Criterion benches (opt-in, not required in default CI) for:
    • match_route_compiled (static vs param route)
    • map_handler_return (str / bytes)
    • json_to_py (before/after direct conversion)
  2. Extend perf-test with wrk scenarios:
    • plain text GET
    • JSON POST body + JSON response
    • JWT-protected GET
    • CORS-enabled app
    • route with one dependency
  3. Document how to run locally; optional CI smoke with threshold (low connection count).

Files

  • new benches/, Cargo.toml, perf-test/, perf-test/README.md
  • optional workflow job (manual / scheduled)

Acceptance criteria

  • cargo bench runs selected microbenches when configured.
  • perf-test documents all scenarios and env vars (OXYROUTE_BENCH=1, etc.).
  • README explains baseline collection before perf PRs.

Expected impact

Evidence-based perf work; regression detection for hot-path changes.

Activity

  1. added this to the v0.3.0 milestone on May 25, 2026
  2. ZhuchkaTriplesix commented on Jul 20, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Shipped in #134 (merged to dev).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions