From 1701d1441749fdd3689fae2092e29bccb8ece37b Mon Sep 17 00:00:00 2001 From: Martossy Alex Date: Tue, 27 Aug 2024 18:13:27 +0200 Subject: [PATCH] Remove the benchmark from the readme as it is not up to date. --- README.md | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/README.md b/README.md index 010d427..8e1180c 100644 --- a/README.md +++ b/README.md @@ -41,21 +41,4 @@ The `Utf8JsonFormatter` constructor accepts the following options: # Why? -The recommended `ExpressionTemplate` is not as performant as a `Utf8JsonWriter`. -`Serilog.Extensions.Formatting.Benchmark.JsonFormatterEnrichBenchmark` - -| Method | Formatter | Mean | Error | StdDev | Median | Gen0 | Allocated | -|-----------------------|----------------|-------------:|-------------:|-------------:|-------------:|-----------:|-------------:| -| **EmitLogEvent** | **Json** | **11.81 μs** | **0.230 μs** | **0.236 μs** | **11.89 μs** | **2.8687** | **8.81 KB** | -| **EmitLogEvent** | **Utf8Json** | **12.82 μs** | **0.256 μs** | **0.647 μs** | **12.49 μs** | **2.5024** | **7.76 KB** | -| **EmitLogEvent** | **Expression** | **23.40 μs** | **0.455 μs** | **0.773 μs** | **23.11 μs** | **4.3945** | **13.69 KB** | -| | | | | | | | | -| **ComplexProperties** | **Json** | **18.63 μs** | **0.373 μs** | **0.591 μs** | **18.73 μs** | **3.5400** | **10.91 KB** | -| **ComplexProperties** | **Utf8Json** | **18.48 μs** | **0.362 μs** | **0.519 μs** | **18.37 μs** | **3.1738** | **9.92 KB** | -| **ComplexProperties** | **Expression** | **33.72 μs** | **0.613 μs** | **0.776 μs** | **33.68 μs** | **5.8594** | **18.05 KB** | -| | | | | | | | | -| **IntProperties** | **Json** | **11.45 μs** | **0.209 μs** | **0.186 μs** | **11.44 μs** | **2.7466** | **8.58 KB** | -| **IntProperties** | **Utf8Json** | **13.12 μs** | **0.254 μs** | **0.356 μs** | **12.97 μs** | **2.4414** | **7.53 KB** | -| **IntProperties** | **Expression** | **23.84 μs** | **0.464 μs** | **0.534 μs** | **23.69 μs** | **4.3945** | **13.82 KB** | - -Also, I specifically had a use-case in a project which required logs to be in `camelCase`, and none of the built-in formatters supported that, not even `ExpressionTemplate`, since I couldn't find a way to specify a custom `JsonNamingPolicy` for properties. +I specifically had a use-case in a project which required logs to be in `camelCase`, and none of the built-in formatters supported that, not even `ExpressionTemplate`, since I couldn't find a way to specify a custom `JsonNamingPolicy` for properties.