Skip to main content

Benchmarks

These benchmarks compare the happy-path overhead of aweXpect.Json (passing assertions, the dominant case in a healthy test suite) against the equivalent FluentAssertions calls.

Methodology
  • Suite: HappyCaseBenchmarks driven by BenchmarkDotNet.
  • Job: MediumRun with the in-process toolchain.
  • Runner: ubuntu-latest GitHub Actions agent, refreshed on every push to main.
  • FluentAssertions has expectations on JsonNode, but not on JSON strings or JsonElement. Where it lacks an expectation, its benchmark does what a FluentAssertions user writes instead, e.g. parse the string into a JsonNode.
  • Each tab shows the latest measured time and allocated memory; bars are scaled within the row so length corresponds to magnitude. Lower is better.
FluentAssertions v8.11.0
1.0×as long
3.0×as much memory
relative to aweXpect · median of 10 benchmarks

Verifies that a JSON string matches an expected object. FluentAssertions parses the string into a JsonNode.

Time
aweXpect2.06 µs
FluentAssertions15.91 µs+674%
Memory
aweXpect1.11 KiB
FluentAssertions25.53 KiB+2201%
Captured on commit 77e01f4b (2026-10-31) on ubuntu-latest.
aweXpect
await That(_jsonString).IsValidJsonMatching(new { title = "Let It Be", artist = "The Beatles", });
FluentAssertions
JsonNode.Parse(_jsonString).Should().BeEquivalentTo(new { title = "Let It Be", artist = "The Beatles", });

View source on GitHub →