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-09-10 13:02 UTC (commit dda402f).

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.46M ops/s100%8.15 KiB0.00 B0.00 ms0 / 0 / 01
Shared timeout → retry → ratio breaker1Polly1.37M ops/s100%6.90 GiB48.00 B118.73 ms441 / 8 / 01
Shared timeout → retry → ratio breaker4Kevlar3.46M ops/s398%11.10 KiB0.00 B0.00 ms0 / 0 / 03.22K
Shared timeout → retry → ratio breaker4Polly2.68M ops/s396%13.50 GiB48.00 B295.85 ms867 / 8 / 03.94K
Shared timeout → retry4Kevlar3.19M ops/s398%10.62 KiB0.00 B0.00 ms0 / 0 / 021.99K
Shared timeout → retry4Polly3.68M ops/s398%9.26 GiB24.00 B211.91 ms595 / 8 / 01.51K
Per-worker timeout → retry → ratio breaker4Kevlar3.44M ops/s398%14.89 KiB0.00 B0.00 ms0 / 0 / 03.24K
Per-worker timeout → retry → ratio breaker4Polly2.74M ops/s398%13.80 GiB48.00 B335.81 ms886 / 8 / 01.10K

Comparisons

ScenarioWorkersKevlar / Polly throughput
Shared timeout → retry → ratio breaker11.79×
Shared timeout → retry → ratio breaker41.29×
Shared timeout → retry40.86×
Per-worker timeout → retry → ratio breaker41.25×

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.
  • 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: 77.27 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.