Benchmarks
CerbiStream 2.0.119 vs Serilog, NLog, log4net, and MS Logging on .NET 9. Comparable plain-logging performance, significantly lower overhead for governance scenarios versus DIY middleware. Reproducible: full methodology and raw output 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
No performance penalty for choosing CerbiStream
Built-in encryption - benchmarks show ~4x lower overhead vs equivalent custom implementations
Native redaction - benchmarks show ~8x lower overhead vs equivalent NLog/Serilog DIY implementations
Roslyn analyzers catch issues at build time
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.
| Logger | Mean (ns) | Allocated | Ratio |
|---|---|---|---|
| NLog | 63.99 | 56 B | 0.95x |
| Serilog | 65.18 | 56 B | 0.96x |
| CerbiStream | 66.24 | 56 B | 1.00x |
| MS Logging | 67.68 | 56 B | 1.02x |
| log4net | 67.76 | 56 B | 1.02x |
Feature Availability
CerbiStream provides governance features that don't exist in other logging libraries.
| Feature | CerbiStream | Serilog | NLog | log4net | MS Logging |
|---|---|---|---|---|---|
| Structured Logging | |||||
| Async Sinks | |||||
| Built-in Encryption | |||||
| PII Auto-Redaction | |||||
| Schema Validation | |||||
| Governance Profiles (JSON) | |||||
| Design-Time Analyzers | |||||
| Required/Forbidden Fields | |||||
| Governance Scoring |
6 governance features that competitors simply don't have. No plugins. No custom code. Built-in.
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

