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-10-19 06:46 UTC (commit 57d9416).

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 breaker1Kevlar2.66M ops/s100%8.23 KiB0.00 B0.00 ms0 / 0 / 00
Shared timeout → retry → ratio breaker1Polly1.34M ops/s100%5.39 GiB48.00 B101.21 ms344 / 8 / 00
Shared timeout → retry → ratio breaker4Kevlar6.17M ops/s397%13.12 KiB0.00 B0.00 ms0 / 0 / 02
Shared timeout → retry → ratio breaker4Polly2.72M ops/s397%10.93 GiB48.00 B282.83 ms701 / 8 / 03.29K
Shared timeout → retry4Kevlar9.53M ops/s398%9.12 KiB0.00 B0.00 ms0 / 0 / 01
Shared timeout → retry4Polly3.83M ops/s398%7.70 GiB24.00 B185.84 ms495 / 8 / 0950
Per-worker timeout → retry → ratio breaker4Kevlar6.40M ops/s398%16.93 KiB0.00 B0.00 ms0 / 0 / 00
Per-worker timeout → retry → ratio breaker4Polly2.79M ops/s398%11.22 GiB48.00 B283.14 ms719 / 8 / 0642
Shared open breaker — every call rejected4Kevlar10.86M ops/s392%131.08 GiB144.00 B1.93 s8557 / 8 / 00
Shared open breaker — every call rejected4Polly4.79M ops/s393%80.26 GiB200.00 B1.36 s5153 / 8 / 039.29K

Comparisons​

ScenarioWorkersKevlar / Polly throughput
Shared timeout → retry → ratio breaker11.99×
Shared timeout → retry → ratio breaker42.27×
Shared timeout → retry42.49×
Per-worker timeout → retry → ratio breaker42.30×
Shared open breaker — every call rejected42.27×

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: 81.18 MiB.

Environment​

  • Ubuntu 24.04.5 LTS
  • .NET 10.0.13
  • 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.