Skip to main content

Stress tests

Kevlar and Polly v8 run the same composed timeout, retry, and circuit-breaker workload under sustained parallel load. Alternating measurement rounds run in a single process, so they use the same GitHub runner while balancing early- and late-run conditions.

Last updated 2026-12-01 15:03 UTC (commit 7cbee97).

note

Shared CI runners vary. Treat one run as a sustained-load health check, not a universal capacity claim. Compare ratios and allocation behavior, then measure your own workload.

Latest result​

ScenarioWorkersLibraryThroughputCPUAllocatedAllocated/opGC pauseGC collections (0 / 1 / 2)Process lock contentions
Shared timeout → retry → ratio breaker1Kevlar3.23M ops/s100%6.98 KiB0.00 B0.00 ms0 / 0 / 00
Shared timeout → retry → ratio breaker1Polly2.22M ops/s100%8.93 GiB48.00 B35.43 ms112 / 8 / 00
Shared timeout → retry → ratio breaker4Kevlar6.78M ops/s398%10.67 KiB0.00 B0.00 ms0 / 0 / 014
Shared timeout → retry → ratio breaker4Polly3.07M ops/s397%12.37 GiB48.00 B59.42 ms156 / 8 / 02.74K
Shared timeout → retry4Kevlar14.88M ops/s398%8.72 KiB0.00 B0.00 ms0 / 0 / 00
Shared timeout → retry4Polly3.63M ops/s398%7.30 GiB24.00 B35.08 ms92 / 4 / 05
Per-worker timeout → retry → ratio breaker4Kevlar10.20M ops/s399%14.92 KiB0.00 B0.00 ms0 / 0 / 00
Per-worker timeout → retry → ratio breaker4Polly3.25M ops/s398%13.09 GiB48.00 B61.95 ms167 / 8 / 04
Shared open breaker — every call rejected4Kevlar19.68M ops/s396%237.53 GiB144.00 B717.62 ms3099 / 8 / 00
Shared open breaker — every call rejected4Polly3.87M ops/s396%64.82 GiB200.00 B284.81 ms829 / 8 / 0131.90K

Comparisons​

ScenarioWorkersKevlar / Polly throughput
Shared timeout → retry → ratio breaker11.46×
Shared timeout → retry → ratio breaker42.21×
Shared timeout → retry44.10×
Per-worker timeout → retry → ratio breaker43.14×
Shared open breaker — every call rejected45.09×

Method​

  • 1 and 4 parallel workers; 15 minutes total measured time, split equally between scenarios and libraries across 4 alternating rounds.
  • Each scenario and library warmed for 2 seconds before measurement.
  • Shared and per-worker ratio-breaker scenarios run Timeout(10 s) → Retry(3, no delay) → CircuitBreaker(10% over 30 s, min 100, break 5 s).
  • Timeout/retry isolates pipeline overhead from circuit-breaker shared-state contention.
  • The shared open-breaker scenario trips one breaker for the whole run, so every call measures contended fast-fail rejection.
  • Process-wide CPU, allocation, GC pause, collection, and managed-lock contention counters are captured separately for each phase.
  • Peak working set for the shared process: 146.79 MiB.

Environment​

  • Ubuntu 26.04.1 LTS
  • .NET 11.0.0
  • 4 logical processors visible to .NET

Reproduce​

dotnet run -c Release --project benchmarks/Kevlar.StressTests -- --duration 00:15:00

Use --workers, --warmup, and --output to override the defaults. The stress workflow runs weekly and republishes this page.