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-05 03:48 UTC (commit a78926f).

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.13M ops/s100%8.54 KiB0.00 B0.00 ms0 / 0 / 01
Shared timeout → retry → ratio breaker1Polly1.81M ops/s100%7.28 GiB48.00 B127.01 ms466 / 8 / 01
Shared timeout → retry → ratio breaker4Kevlar7.34M ops/s398%12.34 KiB0.00 B0.00 ms0 / 0 / 03
Shared timeout → retry → ratio breaker4Polly3.61M ops/s397%14.51 GiB48.00 B327.87 ms932 / 8 / 02.92K
Shared timeout → retry4Kevlar12.09M ops/s399%12.23 KiB0.00 B0.00 ms0 / 0 / 01
Shared timeout → retry4Polly5.24M ops/s398%10.53 GiB24.00 B227.49 ms675 / 8 / 0378
Per-worker timeout → retry → ratio breaker4Kevlar8.57M ops/s399%18.12 KiB0.00 B0.00 ms0 / 0 / 00
Per-worker timeout → retry → ratio breaker4Polly3.63M ops/s398%14.61 GiB48.00 B326.60 ms937 / 8 / 0282
Shared open breaker — every call rejected4Kevlar14.69M ops/s390%177.37 GiB144.00 B2.50 s11577 / 8 / 00
Shared open breaker — every call rejected4Polly5.87M ops/s392%98.47 GiB200.00 B1.64 s6323 / 8 / 057.23K

Comparisons​

ScenarioWorkersKevlar / Polly throughput
Shared timeout → retry → ratio breaker11.73×
Shared timeout → retry → ratio breaker42.04×
Shared timeout → retry42.31×
Per-worker timeout → retry → ratio breaker42.36×
Shared open breaker — every call rejected42.50×

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

Environment​

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