Performance Benchmarks

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

Independent benchmarks prove CerbiStream matches industry-standard loggers on plain logging while delivering 4x faster encryption and 8x faster PII redaction—with governance features competitors don't have.

65
Benchmarks
66ns
Plain Logging
4x
Faster Encryption
8x
Faster Redaction

The Bottom Line

66 ns
Plain Logging
Same as competitors

No performance penalty for choosing CerbiStream

64 ns
Encrypted Logging
4x faster

Built-in encryption with zero overhead

91 ns
PII Redaction
8x faster

Native redaction vs custom middleware

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 apps