1,284,920,341
In-process · Before the sink

Benchmarks

Performance benchmarks.

CerbiStream 1.1.88 vs Serilog, NLog, log4net, and MS Logging on .NET 9.

Benchmarks show CerbiStream performs comparably to established .NET loggers on plain structured logging. For scenarios with built-in governance — encryption and PII redaction — benchmarks show significantly lower overhead compared to DIY middleware implementations of the same capabilities in other frameworks. Results are reproducible: full methodology and raw output are available on GitHub.

65
Benchmarks
66ns
Plain Logging
4x
Faster Encryption
8x
Faster Redaction
View Full Results on GitHub

Benchmarks run with BenchmarkDotNet on .NET 9, Release build, no debugger attached. DIY comparisons use framework-native approaches to replicate the same capability. Results are reproducible from the linked repository.

Key findings

66 ns
Plain Logging
Same as competitors

No performance penalty for choosing CerbiStream

64 ns
Encrypted Logging
vs DIY middleware

Built-in encryption — benchmarks show ~4x lower overhead vs equivalent custom implementations

91 ns
PII Redaction
vs DIY middleware

Native redaction — benchmarks show ~8x lower overhead vs equivalent NLog/Serilog DIY implementations

0 ns
Design-Time
Zero runtime cost

Roslyn analyzers catch issues at build time

Plain Logging Performance

All loggers perform similarly for basic structured logging. CerbiStream adds governance capabilities without adding overhead.

Verdict: CerbiStream matches industry-standard loggers. You get governance for free.

LoggerMean (ns)AllocatedRatio
NLog63.9956 B0.95x
Serilog65.1856 B0.96x
CerbiStream66.2456 B1.00x
MS Logging67.6856 B1.02x
log4net67.7656 B1.02x

Feature Availability

CerbiStream provides governance features that don't exist in other logging libraries.

FeatureCerbiStreamSerilogNLoglog4netMS Logging
Structured Logging
Async Sinks
Built-in Encryption
PII Auto-Redaction
Schema Validation
Governance Profiles (JSON)
Design-Time Analyzers
Required/Forbidden Fields
Governance Scoring
Built-in
Not available
Limited

6 governance features that competitors simply don't have. No plugins. No custom code. Built-in.

Test Environment
Framework.NET 9.0 (RyuJIT x64)
OSWindows 11
CPUIntel i9-9900K
ToolBenchmarkDotNet 0.15.8
SinkNo-op (isolated)
Iterations10 measured, 3 warmup
Reproduce These Results
git clone https://github.com/Zeroshi/CerbiStream.BenchmarkTests
cd CerbiStream.BenchmarkTests
dotnet run -c Release --project Cerbi-Benchmark-Tests/Cerbi-Benchmark-Tests.csproj

Results appear in BenchmarkDotNet.Artifacts/results/

Ready to govern your logs?

Start with CerbiStream in under 60 seconds, or explore the benchmark repository.

CerbiStream + analyzers free on NuGet | CerbiShield licensed by governed event volume