Background:
The 2FA backend has no performance benchmarks. There is no baseline for TOTP verification throughput, making it impossible to detect performance regressions introduced by future changes.
Problem:
No benchmarks exist for the backend 2FA hot paths.
What "done" looks like:
- A
benches/totp_verification.rs benchmark measures TOTP token generation and verification throughput.
- A
benches/rate_limiter.rs benchmark measures InMemoryRateLimiter::check under concurrent load.
- Benchmarks run via
cargo bench and output ns/iter results.
- Baseline numbers are documented in
docs/development.md.
Implementation guidelines:
- Key files:
backend-2fa/Cargo.toml (add bench targets), backend-2fa/benches/.
- Use the
criterion crate with an exact pinned version.
- Benchmarks must not require a running database.
PR must include:
- Two benchmark files
criterion dev-dependency
- Baseline numbers in
development.md
cargo bench passing
Background:
The 2FA backend has no performance benchmarks. There is no baseline for TOTP verification throughput, making it impossible to detect performance regressions introduced by future changes.
Problem:
No benchmarks exist for the backend 2FA hot paths.
What "done" looks like:
benches/totp_verification.rsbenchmark measures TOTP token generation and verification throughput.benches/rate_limiter.rsbenchmark measuresInMemoryRateLimiter::checkunder concurrent load.cargo benchand outputns/iterresults.docs/development.md.Implementation guidelines:
backend-2fa/Cargo.toml(add bench targets),backend-2fa/benches/.criterioncrate with an exact pinned version.PR must include:
criteriondev-dependencydevelopment.mdcargo benchpassing