From 7f145b5cc5cce5491a8611de7549ecaecc09c756 Mon Sep 17 00:00:00 2001 From: applusplus <42235465+applusplus@users.noreply.github.com> Date: Tue, 23 Feb 2021 16:10:41 +0100 Subject: [PATCH 1/5] Update projects to .NET 5. Update NLog to v4.7.7 Update Serilog to v2.10.0" Update README.md with my results. --- .../LoggingPerformance.NLog.csproj | 26 +++- .../LoggingPerformance.Serilog.csproj | 20 ++- LoggingPerformance.sln | 8 +- README.md | 125 +++++++++--------- 4 files changed, 106 insertions(+), 73 deletions(-) diff --git a/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj b/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj index ebd3f94..63b65c9 100644 --- a/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj +++ b/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj @@ -2,12 +2,32 @@ Exe - netcoreapp2.0 + net5.0 + AnyCPU;x64 + + + + x64 + + + + x64 + + + + x64 + + + + x64 - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj b/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj index 4cca98c..d65ef80 100644 --- a/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj +++ b/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj @@ -2,13 +2,25 @@ Exe - netcoreapp2.0 + net5.0 + AnyCPU;x64 + + + + x64 + + + + x64 - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/LoggingPerformance.sln b/LoggingPerformance.sln index 03ac4c6..63757d8 100644 --- a/LoggingPerformance.sln +++ b/LoggingPerformance.sln @@ -1,11 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2026 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30907.101 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingPerformance.Serilog", "LoggingPerformance.Serilog\LoggingPerformance.Serilog.csproj", "{8C0236B3-A8A7-4D49-84A4-CCBEBBCD0956}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoggingPerformance.Serilog", "LoggingPerformance.Serilog\LoggingPerformance.Serilog.csproj", "{8C0236B3-A8A7-4D49-84A4-CCBEBBCD0956}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingPerformance.NLog", "LoggingPerformance.NLog\LoggingPerformance.NLog.csproj", "{5996F906-257C-4C07-91EB-FEFCF8411D09}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoggingPerformance.NLog", "LoggingPerformance.NLog\LoggingPerformance.NLog.csproj", "{5996F906-257C-4C07-91EB-FEFCF8411D09}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/README.md b/README.md index ebd8c73..c42375c 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,16 @@ Logging performance comparison between Serilog and NLog. ### Dev info -1. Windows 10 Education x64 -2. Microsoft Visual Studio Enterprise 2017 15.7.3 -3. .NET Core 2.0 +1. Windows 10 Enterprise 64-bit (Build 18363) +2. Microsoft Visual Studio Enterprise 2019 16.8.4 +3. .NET 5 +4. Platform target: 64bit ### Computer infomation -1. Intel i5-7500 3.40GHz -2. 16GB -3. Intel 600P 256G +1. Intel Core i7 8665U @ 1.90GHz +2. 16GB DDR4-2667 (1333 MHz) +3. Seagate FireCuda 520 SSD 1TB ### Involving library @@ -33,37 +34,37 @@ Producer: 1 ### Serilog -Generated 1000000 values in 3506ms (throughput = 285199.451 ops per second) -Mean latency = 3.474mcs -99% observations less than = 15.624mcs -99.99% observations less than = 125.596mcs -0) 2.404 - 3.7258 = 950441 -1) 3.726 - 5.0479 = 15937 -2) 5.048 - 6.3699 = 2294 -3) 6.370 - 7.6920 = 3218 -4) 7.692 - 9.0141 = 10559 -5) 9.014 - 10.3361 = 1593 -6) 10.336 - 11.6582 = 630 -7) 11.658 - 12.9803 = 705 -8) 12.980 - 14.3023 = 466 -9) 14.302 - 15.6244 = 5128 +Generated 1000000 values in 6519ms (throughput = 153375,423 ops per second) +Mean latency = 6,468mcs +99% observations less than = 17,000mcs +99.99% observations less than = 226,800mcs +0) 4,500 - 5,7500 = 850512 +1) 5,750 - 7,0000 = 61423 +2) 7,000 - 8,2500 = 38397 +3) 8,250 - 9,5000 = 15669 +4) 9,500 - 10,7500 = 7763 +5) 10,750 - 12,0000 = 4334 +6) 12,000 - 13,2500 = 3697 +7) 13,250 - 14,5000 = 3101 +8) 14,500 - 15,7500 = 5296 +9) 15,750 - 17,0000 = 5351 ### NLog -Generated 1000000 values in 7256ms (throughput = 137812.554 ops per second) -Mean latency = 7.225mcs -99% observations less than = 434.178mcs -99.99% observations less than = 1055.547mcs -0) 0.901 - 44.2290 = 989657 -1) 44.229 - 87.5566 = 46 -2) 87.557 - 130.8843 = 12 -3) 130.884 - 174.2119 = 230 -4) 174.212 - 217.5395 = 43 -5) 217.540 - 260.8671 = 6 -6) 260.867 - 304.1948 = 1 -7) 304.195 - 347.5224 = 2 -8) 347.522 - 390.8500 = 0 -9) 390.850 - 434.1776 = 5 +Generated 1000000 values in 2710ms (throughput = 368929,577 ops per second) +Mean latency = 2,658mcs +99% observations less than = 4,200mcs +99.99% observations less than = 1979,300mcs +0) 1,100 - 1,4100 = 756134 +1) 1,410 - 1,7200 = 11581 +2) 1,720 - 2,0300 = 111748 +3) 2,030 - 2,3400 = 61373 +4) 2,340 - 2,6500 = 28529 +5) 2,650 - 2,9600 = 5891 +6) 2,960 - 3,2700 = 5260 +7) 3,270 - 3,5800 = 5621 +8) 3,580 - 3,8900 = 2497 +9) 3,890 - 4,2000 = 1413 # Benchmarks 2 @@ -75,34 +76,34 @@ Producer: 1 ### Serilog -Generated 5000000 values in 17053ms (throughput = 293191.681 ops per second) -Mean latency = 3.381mcs -99% observations less than = 15.324mcs -99.99% observations less than = 120.789mcs -0) 2.404 - 3.6958 = 4746369 -1) 3.696 - 4.9878 = 97342 -2) 4.988 - 6.2798 = 7559 -3) 6.280 - 7.5718 = 6611 -4) 7.572 - 8.8638 = 58916 -5) 8.864 - 10.1559 = 10432 -6) 10.156 - 11.4479 = 3673 -7) 11.448 - 12.7399 = 1609 -8) 12.740 - 14.0319 = 1525 -9) 14.032 - 15.3239 = 19770 +Generated 5000000 values in 29975ms (throughput = 166805,337 ops per second) +Mean latency = 5,950mcs +99% observations less than = 16,100mcs +99.99% observations less than = 206,800mcs +0) 4,400 - 5,5700 = 4285842 +1) 5,570 - 6,7400 = 374515 +2) 6,740 - 7,9100 = 110965 +3) 7,910 - 9,0800 = 48389 +4) 9,080 - 10,2500 = 38320 +5) 10,250 - 11,4200 = 19108 +6) 11,420 - 12,5900 = 11534 +7) 12,590 - 13,7600 = 11428 +8) 13,760 - 14,9300 = 20614 +9) 14,930 - 16,1000 = 30396 ### NLog -Generated 5000000 values in 38294ms (throughput = 130567.331 ops per second) -Mean latency = 7.628mcs -99% observations less than = 462.422mcs -99.99% observations less than = 1126.458mcs -0) 0.901 - 47.0534 = 4947863 -1) 47.053 - 93.2055 = 445 -2) 93.205 - 139.3575 = 825 -3) 139.357 - 185.5095 = 684 -4) 185.510 - 231.6616 = 116 -5) 231.662 - 277.8136 = 29 -6) 277.814 - 323.9656 = 16 -7) 323.966 - 370.1176 = 5 -8) 370.118 - 416.2697 = 1 -9) 416.270 - 462.4217 = 17 \ No newline at end of file +Generated 5000000 values in 12431ms (throughput = 402201,458 ops per second) +Mean latency = 2,436mcs +99% observations less than = 3,400mcs +99.99% observations less than = 1976,300mcs +0) 1,100 - 1,3300 = 4126122 +1) 1,330 - 1,5600 = 178115 +2) 1,560 - 1,7900 = 22494 +3) 1,790 - 2,0200 = 278309 +4) 2,020 - 2,2500 = 174330 +5) 2,250 - 2,4800 = 115672 +6) 2,480 - 2,7100 = 29218 +7) 2,710 - 2,9400 = 7554 +8) 2,940 - 3,1700 = 7879 +9) 3,170 - 3,4000 = 12038 \ No newline at end of file From 64f484b7c49bce0b6e135a02c0acd9fd48182a4b Mon Sep 17 00:00:00 2001 From: applusplus <42235465+applusplus@users.noreply.github.com> Date: Tue, 23 Feb 2021 16:29:44 +0100 Subject: [PATCH 2/5] Update Serilog settings to match NLog settings (async and buffer limit). Update results. --- LoggingPerformance.NLog/Program.cs | 2 +- .../LoggingPerformance.Serilog.csproj | 1 + LoggingPerformance.Serilog/Program.cs | 4 +- README.md | 112 +++++++++--------- 4 files changed, 60 insertions(+), 59 deletions(-) diff --git a/LoggingPerformance.NLog/Program.cs b/LoggingPerformance.NLog/Program.cs index 67e1843..02ac115 100644 --- a/LoggingPerformance.NLog/Program.cs +++ b/LoggingPerformance.NLog/Program.cs @@ -15,7 +15,7 @@ namespace LoggingPerformance.NLog { internal class Program { - private static int _countPerThread = 5000000; + private static int _countPerThread = 1000000; private static int _producersCount = 1; private static int _totalCount; diff --git a/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj b/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj index d65ef80..2a3faa1 100644 --- a/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj +++ b/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj @@ -20,6 +20,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/LoggingPerformance.Serilog/Program.cs b/LoggingPerformance.Serilog/Program.cs index ca8903e..a3589fb 100644 --- a/LoggingPerformance.Serilog/Program.cs +++ b/LoggingPerformance.Serilog/Program.cs @@ -9,14 +9,14 @@ namespace LoggingPerformance.Serilog { internal class Program { - private static int _countPerThread = 5000000; + private static int _countPerThread = 1000000; private static int _producersCount = 1; private static int _totalCount; private static void Main(string[] args) { var log = new LoggerConfiguration() - .WriteTo.File("Log.txt", buffered: true, flushToDiskInterval: TimeSpan.FromMilliseconds(1000)) + .WriteTo.Async(a => a.File("Log.txt", buffered: true), 500, true) .CreateLogger(); Log.Logger = log; diff --git a/README.md b/README.md index c42375c..0d71d2f 100644 --- a/README.md +++ b/README.md @@ -34,37 +34,37 @@ Producer: 1 ### Serilog -Generated 1000000 values in 6519ms (throughput = 153375,423 ops per second) -Mean latency = 6,468mcs -99% observations less than = 17,000mcs -99.99% observations less than = 226,800mcs -0) 4,500 - 5,7500 = 850512 -1) 5,750 - 7,0000 = 61423 -2) 7,000 - 8,2500 = 38397 -3) 8,250 - 9,5000 = 15669 -4) 9,500 - 10,7500 = 7763 -5) 10,750 - 12,0000 = 4334 -6) 12,000 - 13,2500 = 3697 -7) 13,250 - 14,5000 = 3101 -8) 14,500 - 15,7500 = 5296 -9) 15,750 - 17,0000 = 5351 +Generated 1000000 values in 3433ms (throughput = 291259,161 ops per second) +Mean latency = 3,392mcs +99% observations less than = 10,500mcs +99.99% observations less than = 986,500mcs +0) 1,900 - 2,7600 = 689740 +1) 2,760 - 3,6200 = 199819 +2) 3,620 - 4,4800 = 56410 +3) 4,480 - 5,3400 = 17897 +4) 5,340 - 6,2000 = 7799 +5) 6,200 - 7,0600 = 5354 +6) 7,060 - 7,9200 = 3514 +7) 7,920 - 8,7800 = 2476 +8) 8,780 - 9,6400 = 2896 +9) 9,640 - 10,5000 = 4452 ### NLog -Generated 1000000 values in 2710ms (throughput = 368929,577 ops per second) -Mean latency = 2,658mcs -99% observations less than = 4,200mcs -99.99% observations less than = 1979,300mcs -0) 1,100 - 1,4100 = 756134 -1) 1,410 - 1,7200 = 11581 -2) 1,720 - 2,0300 = 111748 -3) 2,030 - 2,3400 = 61373 -4) 2,340 - 2,6500 = 28529 -5) 2,650 - 2,9600 = 5891 -6) 2,960 - 3,2700 = 5260 -7) 3,270 - 3,5800 = 5621 -8) 3,580 - 3,8900 = 2497 -9) 3,890 - 4,2000 = 1413 +Generated 1000000 values in 2564ms (throughput = 389893,174 ops per second) +Mean latency = 2,512mcs +99% observations less than = 3,700mcs +99.99% observations less than = 1945,500mcs +0) 1,100 - 1,3600 = 735053 +1) 1,360 - 1,6200 = 90460 +2) 1,620 - 1,8800 = 13521 +3) 1,880 - 2,1400 = 102645 +4) 2,140 - 2,4000 = 34569 +5) 2,400 - 2,6600 = 4360 +6) 2,660 - 2,9200 = 3581 +7) 2,920 - 3,1800 = 1887 +8) 3,180 - 3,4400 = 2701 +9) 3,440 - 3,7000 = 1224 # Benchmarks 2 @@ -76,34 +76,34 @@ Producer: 1 ### Serilog -Generated 5000000 values in 29975ms (throughput = 166805,337 ops per second) -Mean latency = 5,950mcs -99% observations less than = 16,100mcs -99.99% observations less than = 206,800mcs -0) 4,400 - 5,5700 = 4285842 -1) 5,570 - 6,7400 = 374515 -2) 6,740 - 7,9100 = 110965 -3) 7,910 - 9,0800 = 48389 -4) 9,080 - 10,2500 = 38320 -5) 10,250 - 11,4200 = 19108 -6) 11,420 - 12,5900 = 11534 -7) 12,590 - 13,7600 = 11428 -8) 13,760 - 14,9300 = 20614 -9) 14,930 - 16,1000 = 30396 +Generated 5000000 values in 16495ms (throughput = 303110,984 ops per second) +Mean latency = 3,261mcs +99% observations less than = 11,200mcs +99.99% observations less than = 955,200mcs +0) 1,900 - 2,8300 = 3707027 +1) 2,830 - 3,7600 = 920038 +2) 3,760 - 4,6900 = 174384 +3) 4,690 - 5,6200 = 39953 +4) 5,620 - 6,5500 = 22729 +5) 6,550 - 7,4800 = 16608 +6) 7,480 - 8,4100 = 12911 +7) 8,410 - 9,3400 = 9397 +8) 9,340 - 10,2700 = 20284 +9) 10,270 - 11,2000 = 27096 ### NLog -Generated 5000000 values in 12431ms (throughput = 402201,458 ops per second) -Mean latency = 2,436mcs -99% observations less than = 3,400mcs -99.99% observations less than = 1976,300mcs -0) 1,100 - 1,3300 = 4126122 -1) 1,330 - 1,5600 = 178115 -2) 1,560 - 1,7900 = 22494 -3) 1,790 - 2,0200 = 278309 -4) 2,020 - 2,2500 = 174330 -5) 2,250 - 2,4800 = 115672 -6) 2,480 - 2,7100 = 29218 -7) 2,710 - 2,9400 = 7554 -8) 2,940 - 3,1700 = 7879 -9) 3,170 - 3,4000 = 12038 \ No newline at end of file +Generated 5000000 values in 12803ms (throughput = 390529,235 ops per second) +Mean latency = 2,511mcs +99% observations less than = 3,600mcs +99.99% observations less than = 1971,700mcs +0) 1,200 - 1,4400 = 4236069 +1) 1,440 - 1,6800 = 24155 +2) 1,680 - 1,9200 = 197400 +3) 1,920 - 2,1600 = 273239 +4) 2,160 - 2,4000 = 165324 +5) 2,400 - 2,6400 = 14370 +6) 2,640 - 2,8800 = 9969 +7) 2,880 - 3,1200 = 13943 +8) 3,120 - 3,3600 = 8822 +9) 3,360 - 3,6000 = 7194 \ No newline at end of file From 77272ca44bf1c4df372fbc1fd8718c40a2e21e7d Mon Sep 17 00:00:00 2001 From: applusplus <42235465+applusplus@users.noreply.github.com> Date: Tue, 23 Feb 2021 16:37:24 +0100 Subject: [PATCH 3/5] Fix README.md line breaks --- README.md | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 0d71d2f..838bc1e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Logging performance comparison between Serilog and NLog. ### Computer infomation -1. Intel Core i7 8665U @ 1.90GHz +1. Intel Core i7 8665U @ 1.90GHz 2. 16GB DDR4-2667 (1333 MHz) 3. Seagate FireCuda 520 SSD 1TB @@ -28,16 +28,17 @@ Logging performance comparison between Serilog and NLog. ### Arrange -Write target: File -Test input count: 1000000 -Producer: 1 +Write target: File +Test input count: 1000000 +Producer: 1 ### Serilog -Generated 1000000 values in 3433ms (throughput = 291259,161 ops per second) -Mean latency = 3,392mcs -99% observations less than = 10,500mcs +Generated 1000000 values in 3433ms (throughput = 291259,161 ops per second) +Mean latency = 3,392mcs +99% observations less than = 10,500mcs 99.99% observations less than = 986,500mcs + 0) 1,900 - 2,7600 = 689740 1) 2,760 - 3,6200 = 199819 2) 3,620 - 4,4800 = 56410 @@ -51,10 +52,11 @@ Mean latency = 3,392mcs ### NLog -Generated 1000000 values in 2564ms (throughput = 389893,174 ops per second) -Mean latency = 2,512mcs -99% observations less than = 3,700mcs -99.99% observations less than = 1945,500mcs +Generated 1000000 values in 2564ms (throughput = 389893,174 ops per second) +Mean latency = 2,512mcs +99% observations less than = 3,700mcs +99.99% observations less than = 1945,500mcs + 0) 1,100 - 1,3600 = 735053 1) 1,360 - 1,6200 = 90460 2) 1,620 - 1,8800 = 13521 @@ -70,16 +72,17 @@ Mean latency = 2,512mcs ### Arrange -Write target: File -Test input count: 5000000 -Producer: 1 +Write target: File +Test input count: 5000000 +Producer: 1 ### Serilog -Generated 5000000 values in 16495ms (throughput = 303110,984 ops per second) -Mean latency = 3,261mcs -99% observations less than = 11,200mcs -99.99% observations less than = 955,200mcs +Generated 5000000 values in 16495ms (throughput = 303110,984 ops per second) +Mean latency = 3,261mcs +99% observations less than = 11,200mcs +99.99% observations less than = 955,200mcs + 0) 1,900 - 2,8300 = 3707027 1) 2,830 - 3,7600 = 920038 2) 3,760 - 4,6900 = 174384 @@ -93,10 +96,11 @@ Mean latency = 3,261mcs ### NLog -Generated 5000000 values in 12803ms (throughput = 390529,235 ops per second) -Mean latency = 2,511mcs -99% observations less than = 3,600mcs -99.99% observations less than = 1971,700mcs +Generated 5000000 values in 12803ms (throughput = 390529,235 ops per second) +Mean latency = 2,511mcs +99% observations less than = 3,600mcs +99.99% observations less than = 1971,700mcs + 0) 1,200 - 1,4400 = 4236069 1) 1,440 - 1,6800 = 24155 2) 1,680 - 1,9200 = 197400 From 8267fbdfc15d5c9280928d3d97df887358e00233 Mon Sep 17 00:00:00 2001 From: applusplus <42235465+applusplus@users.noreply.github.com> Date: Wed, 24 Feb 2021 08:11:53 +0100 Subject: [PATCH 4/5] Remove Serilog buffer limit. Update README.md. --- LoggingPerformance.Serilog/Program.cs | 2 +- README.md | 120 +++++++++++++------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/LoggingPerformance.Serilog/Program.cs b/LoggingPerformance.Serilog/Program.cs index a3589fb..fd9c676 100644 --- a/LoggingPerformance.Serilog/Program.cs +++ b/LoggingPerformance.Serilog/Program.cs @@ -16,7 +16,7 @@ internal class Program private static void Main(string[] args) { var log = new LoggerConfiguration() - .WriteTo.Async(a => a.File("Log.txt", buffered: true), 500, true) + .WriteTo.Async(a => a.File("Log.txt", buffered: true), blockWhenFull: true) .CreateLogger(); Log.Logger = log; diff --git a/README.md b/README.md index 838bc1e..566d16f 100644 --- a/README.md +++ b/README.md @@ -34,39 +34,39 @@ Producer: 1 ### Serilog -Generated 1000000 values in 3433ms (throughput = 291259,161 ops per second) -Mean latency = 3,392mcs -99% observations less than = 10,500mcs -99.99% observations less than = 986,500mcs - -0) 1,900 - 2,7600 = 689740 -1) 2,760 - 3,6200 = 199819 -2) 3,620 - 4,4800 = 56410 -3) 4,480 - 5,3400 = 17897 -4) 5,340 - 6,2000 = 7799 -5) 6,200 - 7,0600 = 5354 -6) 7,060 - 7,9200 = 3514 -7) 7,920 - 8,7800 = 2476 -8) 8,780 - 9,6400 = 2896 -9) 9,640 - 10,5000 = 4452 +Generated 1000000 values in 4541ms (throughput = 220180,668 ops per second) +Mean latency = 4,500mcs +99% observations less than = 10,100mcs +99.99% observations less than = 6068,900mcs + +0) 1,800 - 2,6300 = 453451 +1) 2,630 - 3,4600 = 443718 +2) 3,460 - 4,2900 = 64609 +3) 4,290 - 5,1200 = 10908 +4) 5,120 - 5,9500 = 3786 +5) 5,950 - 6,7800 = 3105 +6) 6,780 - 7,6100 = 2710 +7) 7,610 - 8,4400 = 1313 +8) 8,440 - 9,2700 = 1226 +9) 9,270 - 10,1000 = 5529 ### NLog -Generated 1000000 values in 2564ms (throughput = 389893,174 ops per second) -Mean latency = 2,512mcs -99% observations less than = 3,700mcs -99.99% observations less than = 1945,500mcs - -0) 1,100 - 1,3600 = 735053 -1) 1,360 - 1,6200 = 90460 -2) 1,620 - 1,8800 = 13521 -3) 1,880 - 2,1400 = 102645 -4) 2,140 - 2,4000 = 34569 -5) 2,400 - 2,6600 = 4360 -6) 2,660 - 2,9200 = 3581 -7) 2,920 - 3,1800 = 1887 -8) 3,180 - 3,4400 = 2701 -9) 3,440 - 3,7000 = 1224 +Generated 1000000 values in 2532ms (throughput = 394849,270 ops per second) +Mean latency = 2,483mcs +99% observations less than = 3,000mcs +99.99% observations less than = 2006,100mcs + +0) 1,100 - 1,2900 = 229206 +1) 1,290 - 1,4800 = 610634 +2) 1,480 - 1,6700 = 4284 +3) 1,670 - 1,8600 = 31350 +4) 1,860 - 2,0500 = 62533 +5) 2,050 - 2,2400 = 32473 +6) 2,240 - 2,4300 = 10990 +7) 2,430 - 2,6200 = 4577 +8) 2,620 - 2,8100 = 2385 +9) 2,810 - 3,0000 = 2084 # Benchmarks 2 @@ -78,36 +78,36 @@ Producer: 1 ### Serilog -Generated 5000000 values in 16495ms (throughput = 303110,984 ops per second) -Mean latency = 3,261mcs -99% observations less than = 11,200mcs -99.99% observations less than = 955,200mcs - -0) 1,900 - 2,8300 = 3707027 -1) 2,830 - 3,7600 = 920038 -2) 3,760 - 4,6900 = 174384 -3) 4,690 - 5,6200 = 39953 -4) 5,620 - 6,5500 = 22729 -5) 6,550 - 7,4800 = 16608 -6) 7,480 - 8,4100 = 12911 -7) 8,410 - 9,3400 = 9397 -8) 9,340 - 10,2700 = 20284 -9) 10,270 - 11,2000 = 27096 +Generated 5000000 values in 21804ms (throughput = 229308,208 ops per second) +Mean latency = 4,322mcs +99% observations less than = 10,300mcs +99.99% observations less than = 6132,500mcs + +0) 1,900 - 2,7400 = 3352251 +1) 2,740 - 3,5800 = 1196751 +2) 3,580 - 4,4200 = 283497 +3) 4,420 - 5,2600 = 38472 +4) 5,260 - 6,1000 = 16407 +5) 6,100 - 6,9400 = 15284 +6) 6,940 - 7,7800 = 8545 +7) 7,780 - 8,6200 = 4784 +8) 8,620 - 9,4600 = 7933 +9) 9,460 - 10,3000 = 31267 ### NLog -Generated 5000000 values in 12803ms (throughput = 390529,235 ops per second) -Mean latency = 2,511mcs -99% observations less than = 3,600mcs -99.99% observations less than = 1971,700mcs - -0) 1,200 - 1,4400 = 4236069 -1) 1,440 - 1,6800 = 24155 -2) 1,680 - 1,9200 = 197400 -3) 1,920 - 2,1600 = 273239 -4) 2,160 - 2,4000 = 165324 -5) 2,400 - 2,6400 = 14370 -6) 2,640 - 2,8800 = 9969 -7) 2,880 - 3,1200 = 13943 -8) 3,120 - 3,3600 = 8822 -9) 3,360 - 3,6000 = 7194 \ No newline at end of file +Generated 5000000 values in 12230ms (throughput = 408807,710 ops per second) +Mean latency = 2,397mcs +99% observations less than = 2,600mcs +99.99% observations less than = 1938,000mcs + +0) 1,100 - 1,2500 = 1290664 +1) 1,250 - 1,4000 = 3163826 +2) 1,400 - 1,5500 = 9390 +3) 1,550 - 1,7000 = 17602 +4) 1,700 - 1,8500 = 29994 +5) 1,850 - 2,0000 = 223645 +6) 2,000 - 2,1500 = 245122 +7) 2,150 - 2,3000 = 76199 +8) 2,300 - 2,4500 = 39976 +9) 2,450 - 2,6000 = 12144 \ No newline at end of file From b78c27b6b5c8f981e4de01a8eaf44accaa9715d5 Mon Sep 17 00:00:00 2001 From: Rolf Kristensen Date: Fri, 16 Apr 2021 17:52:01 +0200 Subject: [PATCH 5/5] Simplified project files and replaced NLog.config with just NLog. --- .../LoggingPerformance.NLog.csproj | 19 +------------------ .../LoggingPerformance.Serilog.csproj | 9 --------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj b/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj index 63b65c9..e5d982c 100644 --- a/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj +++ b/LoggingPerformance.NLog/LoggingPerformance.NLog.csproj @@ -3,23 +3,6 @@ Exe net5.0 - AnyCPU;x64 - - - - x64 - - - - x64 - - - - x64 - - - - x64 @@ -27,7 +10,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj b/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj index 2a3faa1..fd9fb98 100644 --- a/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj +++ b/LoggingPerformance.Serilog/LoggingPerformance.Serilog.csproj @@ -3,15 +3,6 @@ Exe net5.0 - AnyCPU;x64 - - - - x64 - - - - x64