pacer

Load testing for .NET, without the baggage.

An open-source performance and load testing framework built only on first-party Microsoft packages. Write scenarios as a pipeline of steps, run them under a realistic load profile, and read latency percentiles in the console, CSV or HTML.

Install
$ dotnet add package Pacer
  • Target.NET 10
  • Third-party dependencies0
  • Load profiles5 + custom
  • LicenceApache-2.0
01 / Features

A small engine that does one job

No plugins, no telemetry, no surprise transitive packages.

First-party only
Built on Microsoft.Extensions.* and System.CommandLine. Nothing else at runtime.
Fluent scenarios
One-time setup, then a pipeline of measured steps per virtual user. Data flows from step to step like a real user journey.
Real percentiles
Bounded-memory HDR-style histograms give accurate p50 through p99.9. Latencies under 5 ms are shown in microseconds.
Baselines & history
Save a run as a named baseline like --save-baseline v1.3.0, diff the next release against it with --baseline v1.3.0, and exit non-zero on regression with --fail-on-regression.
Reports
Console, CSV and a self-contained HTML page out of the box. Bring your own format with IReportWriter.
Live metrics
A Meter("Pacer") you can watch mid-run with dotnet-counters.
Deterministic core
The engine runs on TimeProvider, so it's unit-tested against a fake clock. No sleeps, no flaky timing.
02 / Load profiles

Shape the traffic

A closed model: you choose how many virtual users run, and the profile decides how that number moves over time. Pick one in appsettings.json or on the command line — no code change.

Load

Constant users for a duration.

"Profile": "load"

Soak

Held for a long time to find leaks.

"Profile": "soak"

Spike

A baseline hit by a sudden surge.

"Profile": "spike"

Stress

Steps up until something gives.

"Profile": "stress"

Ramp

Ramp up, hold, ramp down.

"Profile": "ramp"
03 / Quickstart

One file, one command

Register a scenario, configure its load, and run it.

step 1Describe the scenario
Program.csC#
return await PacerApplication.RunAsync(args, builder =>
{
    builder.Services.AddPacer()
        .AddScenario(Scenario.Create("checkout")
            .InGroup("storefront")
            .AddStep("login",    async ctx => StepResult.Ok())
            .AddStep("browse",   async ctx => StepResult.Ok())
            .AddStep("purchase", async ctx => StepResult.Ok()));
});
step 2Configure the load
appsettings.jsonJSON
{
  "Pacer": {
    "Load": {
      "Profile": "ramp", "Users": 200,
      "RampUp": "30s", "Hold": "1m", "RampDown": "30s"
    }
  }
}
step 3Run it
terminal
$ dotnet run -- run --scenario checkout

═══════════════════════════════════════════════════════════════════════════════
 Scenario: checkout  [group: storefront]
 Profile:  Ramp  ·  200 peak users  ·  2m 00s
═══════════════════════════════════════════════════════════════════════════════
 step          ok  fail    rps       in       out      mean       p95       p99
───────────────────────────────────────────────────────────────────────────────
 login     12,418     0  207.0   4.2 MB    1.1 MB   2840 µs  13.95 ms  14.98 ms
 browse    12,390     0  206.5   9.8 MB  904.0 KB  21.40 ms  33.28 ms  34.30 ms
 purchase  12,144   246  206.4   3.1 MB    2.4 MB  30.12 ms  43.52 ms  44.54 ms
───────────────────────────────────────────────────────────────────────────────
 checkout  12,144   246  207.4  17.1 MB    4.4 MB  54.36 ms  80.90 ms  87.04 ms
═══════════════════════════════════════════════════════════════════════════════