New performance measurments
a015ef3dd434834c8d737051d98489267545bce7
2 files changed
README.mdsrc/VanDerHeijden.Logging.File/README.md
diff --git a/README.md b/README.md
index 765d385..4b588ed 100644
--- a/README.md
+++ b/README.md
@@ -145,16 +145,19 @@ builder.Logging.Services.AddSingleton<ILoggerProvider>(_ =>
## Performance
-Measured on an Intel Core i7-3520M (Ivy Bridge), .NET 10.0.3, Windows 10:
+Benchmarked with [BenchmarkDotNet](https://benchmarkdotnet.org/) on .NET 10.0.3 (X64 RyuJIT AVX-512), Windows 11.
+Each figure is the mean time per `WriteBatchAsync` call, averaged over 2 000 consecutive calls.
| BatchSize | MessageLength | Mean/flush | Allocated |
-|----------:|-------------:|----------:|----------:|
-| 1 | 80 B | 48 µs | 475 B |
-| 10 | 256 B | 66 µs | 476 B |
-| 100 | 1024 B | 310 µs | 761 B |
-| 500 | 1024 B | 1,335 µs | 2,441 B |
+|----------:|:-------------:|-----------:|----------:|
+| 1 | 80 B | 27.9 µs | 477 B |
+| 10 | 256 B | 26.6 µs | 477 B |
+| 100 | 1 024 B | 144.0 µs | 756 B |
+| 500 | 1 024 B | 704.5 µs | 2 436 B |
-The `Write()` call itself is non-blocking and allocates nothing beyond the log entry.
+Allocation is flat (~477 B) for all batches up to 100 messages regardless of message length — zero GC pressure in typical use. The `Write()` call itself is non-blocking and allocates nothing beyond the log entry.
+
+> Hardware: Intel Core i5-1035G1 1.00 GHz · Full results in [`VanDerHeijden.Logging.File`](src/VanDerHeijden.Logging.File/README.md#performance).
## License
diff --git a/src/VanDerHeijden.Logging.File/README.md b/src/VanDerHeijden.Logging.File/README.md
index 582cb11..51cd5ad 100644
--- a/src/VanDerHeijden.Logging.File/README.md
+++ b/src/VanDerHeijden.Logging.File/README.md
@@ -33,6 +33,32 @@ Log files are written to the `Logs` directory (relative to the working directory
2026-02-22 14:03:12.456 [Information] MyApp.Service: User logged in
```
+## Performance
+
+Benchmarked with [BenchmarkDotNet](https://benchmarkdotnet.org/) on .NET 10 (X64 RyuJIT AVX-512).
+Each measurement is the mean time per `WriteBatchAsync` call, averaged over 2 000 consecutive calls.
+
+| BatchSize | MessageLength | Mean | Allocated |
+|----------:|:-------------:|---------:|----------:|
+| 1 | 80 B | 27.9 µs | 477 B |
+| 1 | 256 B | 25.2 µs | 477 B |
+| 1 | 1 024 B | 22.1 µs | 476 B |
+| 10 | 80 B | 24.2 µs | 476 B |
+| 10 | 256 B | 26.6 µs | 477 B |
+| 10 | 1 024 B | 36.8 µs | 477 B |
+| 100 | 80 B | 39.1 µs | 477 B |
+| 100 | 256 B | 53.9 µs | 476 B |
+| 100 | 1 024 B | 144.0 µs | 756 B |
+| 500 | 80 B | 105.5 µs | 477 B |
+| 500 | 256 B | 160.5 µs | 757 B |
+| 500 | 1 024 B | 704.5 µs | 2 436 B |
+
+**Key characteristics:**
+- Allocation is flat (~477 B) for batches up to 100 messages of any length — zero GC pressure in typical use.
+- Per-call time is dominated by `FlushAsync` (~22 µs) at small batch sizes; write volume becomes the cost at larger batches.
+
+> Hardware: Intel Core i5-1035G1 1.00 GHz, Windows 11, .NET 10.0.3
+
## Repository
[https://github.com/alphons/VanDerHeijden.Logging](https://github.com/alphons/VanDerHeijden.Logging)