From f592dcf4b164d8dfa31ba67394d1787983789e8b Mon Sep 17 00:00:00 2001 From: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com> Date: Thu, 30 Nov 2023 12:03:27 -0800 Subject: [PATCH] Update benchmarks for Traces and Logs (#5104) --- test/Benchmarks/Benchmarks.csproj | 6 -- test/Benchmarks/{ => Helper}/TestExporter.cs | 0 .../DiagnosticSourceSubscriberBenchmark.cs | 88 ------------------- test/Benchmarks/Logs/LogBenchmarks.cs | 32 ++++--- test/Benchmarks/Logs/LogScopeBenchmarks.cs | 29 ++++-- ...ivity.cs => ActivityCreationBenchmarks.cs} | 32 ++++--- test/Benchmarks/Trace/SamplerBenchmarks.cs | 21 ++--- ...enchmarks.cs => SpanCreationBenchmarks.cs} | 26 +++++- test/Benchmarks/Trace/TraceBenchmarks.cs | 37 ++++---- test/Benchmarks/Trace/TraceShimBenchmarks.cs | 16 ++++ 10 files changed, 119 insertions(+), 168 deletions(-) rename test/Benchmarks/{ => Helper}/TestExporter.cs (100%) delete mode 100644 test/Benchmarks/Instrumentation/DiagnosticSourceSubscriberBenchmark.cs rename test/Benchmarks/Trace/{OpenTelemetrySdkBenchmarksActivity.cs => ActivityCreationBenchmarks.cs} (62%) rename test/Benchmarks/Trace/{OpenTelemetrySdkBenchmarks.cs => SpanCreationBenchmarks.cs} (64%) diff --git a/test/Benchmarks/Benchmarks.csproj b/test/Benchmarks/Benchmarks.csproj index 0376befb943..cb9be4d43ff 100644 --- a/test/Benchmarks/Benchmarks.csproj +++ b/test/Benchmarks/Benchmarks.csproj @@ -24,12 +24,6 @@ - - - - - - diff --git a/test/Benchmarks/TestExporter.cs b/test/Benchmarks/Helper/TestExporter.cs similarity index 100% rename from test/Benchmarks/TestExporter.cs rename to test/Benchmarks/Helper/TestExporter.cs diff --git a/test/Benchmarks/Instrumentation/DiagnosticSourceSubscriberBenchmark.cs b/test/Benchmarks/Instrumentation/DiagnosticSourceSubscriberBenchmark.cs deleted file mode 100644 index 012401de47b..00000000000 --- a/test/Benchmarks/Instrumentation/DiagnosticSourceSubscriberBenchmark.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright The OpenTelemetry Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -using System.Diagnostics; -using BenchmarkDotNet.Attributes; -using OpenTelemetry.Instrumentation; - -namespace Benchmarks.Instrumentation; - -[InProcess] -public class DiagnosticSourceSubscriberBenchmark -{ - [Params(1, 2)] - public int SubscriberCount; - - [Params(false, true)] - public bool UseIsEnabledFilter; - - private const string SourceName = "MySource"; - - private readonly DiagnosticListener listener = new(SourceName); - private readonly List subscribers = new(); - private readonly Func isEnabledFilter = (name, arg1, arg2) => ((EventPayload)arg1).Data == "Data"; - - [GlobalSetup] - public void GlobalSetup() - { - for (var i = 0; i < this.SubscriberCount; ++i) - { - var subscriber = new DiagnosticSourceSubscriber( - new TestListener(), - this.UseIsEnabledFilter ? this.isEnabledFilter : null, - logUnknownException: null); - - this.subscribers.Add(subscriber); - subscriber.Subscribe(); - } - } - - [GlobalCleanup] - public void GlobalCleanup() - { - foreach (var subscriber in this.subscribers) - { - subscriber.Dispose(); - } - } - - [Benchmark] - public void WriteDiagnosticSourceEvent() - { - var payload = new EventPayload("Data"); - this.listener.Write("SomeEvent", payload); - } - - private struct EventPayload - { - public EventPayload(string data) - { - this.Data = data; - } - - public string Data { get; } - } - - private class TestListener : ListenerHandler - { - public TestListener() - : base(DiagnosticSourceSubscriberBenchmark.SourceName) - { - } - - public override bool SupportsNullActivity => true; - } -} diff --git a/test/Benchmarks/Logs/LogBenchmarks.cs b/test/Benchmarks/Logs/LogBenchmarks.cs index 2f9cf71d83a..943b89b71f9 100644 --- a/test/Benchmarks/Logs/LogBenchmarks.cs +++ b/test/Benchmarks/Logs/LogBenchmarks.cs @@ -20,23 +20,21 @@ using OpenTelemetry.Logs; /* -// * Summary * - -BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19044.1466 (21H2) -Intel Core i7-4790 CPU 3.60GHz (Haswell), 1 CPU, 8 logical and 4 physical cores -.NET SDK=6.0.101 - [Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT - DefaultJob : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT - - -| Method | Mean | Error | StdDev | Gen 0 | Allocated | -|--------------------------------------- |-----------:|----------:|----------:|-------:|----------:| -| NoListener | 72.365 ns | 0.9425 ns | 0.8817 ns | 0.0153 | 64 B | -| NoListenerWithLoggerMessageGenerator | 4.769 ns | 0.0161 ns | 0.0142 ns | - | - | -| OneProcessor | 168.330 ns | 0.6198 ns | 0.5494 ns | 0.0553 | 232 B | -| OneProcessorWithLoggerMessageGenerator | 142.898 ns | 0.5233 ns | 0.4086 ns | 0.0401 | 168 B | -| TwoProcessors | 173.727 ns | 0.5978 ns | 0.4992 ns | 0.0553 | 232 B | -| ThreeProcessors | 174.295 ns | 0.7697 ns | 0.7200 ns | 0.0553 | 232 B | +BenchmarkDotNet v0.13.10, Windows 11 (10.0.23424.1000) +Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + + +| Method | Mean | Error | StdDev | Median | Gen0 | Allocated | +|--------------------------------------- |-----------:|----------:|----------:|-----------:|-------:|----------:| +| NoListener | 44.633 ns | 0.8442 ns | 1.9733 ns | 43.683 ns | 0.0102 | 64 B | +| NoListenerWithLoggerMessageGenerator | 1.880 ns | 0.0141 ns | 0.0125 ns | 1.879 ns | - | - | +| OneProcessor | 126.857 ns | 1.1861 ns | 1.0514 ns | 126.730 ns | 0.0165 | 104 B | +| OneProcessorWithLoggerMessageGenerator | 112.677 ns | 1.0021 ns | 0.8884 ns | 112.605 ns | 0.0063 | 40 B | +| TwoProcessors | 129.967 ns | 0.8315 ns | 0.7371 ns | 129.850 ns | 0.0165 | 104 B | +| ThreeProcessors | 130.117 ns | 1.1359 ns | 1.0626 ns | 129.991 ns | 0.0165 | 104 B | */ namespace Benchmarks.Logs; diff --git a/test/Benchmarks/Logs/LogScopeBenchmarks.cs b/test/Benchmarks/Logs/LogScopeBenchmarks.cs index 71d55537629..fe695abeb49 100644 --- a/test/Benchmarks/Logs/LogScopeBenchmarks.cs +++ b/test/Benchmarks/Logs/LogScopeBenchmarks.cs @@ -19,6 +19,19 @@ using Microsoft.Extensions.Logging; using OpenTelemetry.Logs; +/* +BenchmarkDotNet v0.13.10, Windows 11 (10.0.23424.1000) +Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + + +| Method | Mean | Error | StdDev | Allocated | +|------------- |---------:|---------:|---------:|----------:| +| ForEachScope | 74.29 ns | 0.605 ns | 0.536 ns | - | +*/ + namespace Benchmarks.Logs; public class LogScopeBenchmarks @@ -27,8 +40,10 @@ public class LogScopeBenchmarks private readonly Action callback = (LogRecordScope scope, object state) => { - foreach (KeyValuePair scopeItem in scope) + foreach (var scopeItem in scope) { + _ = scopeItem.Key; + _ = scopeItem.Value; } }; @@ -39,19 +54,21 @@ public LogScopeBenchmarks() this.scopeProvider.Push(new ReadOnlyCollection>( new List> { - new KeyValuePair("item1", "value1"), - new KeyValuePair("item2", "value2"), + new("item1", "value1"), + new("item2", "value2"), })); + this.scopeProvider.Push(new ReadOnlyCollection>( new List> { - new KeyValuePair("item3", "value3"), + new("item3", "value3"), })); + this.scopeProvider.Push(new ReadOnlyCollection>( new List> { - new KeyValuePair("item4", "value4"), - new KeyValuePair("item5", "value5"), + new("item4", "value4"), + new("item5", "value5"), })); #pragma warning disable CS0618 // Type or member is obsolete diff --git a/test/Benchmarks/Trace/OpenTelemetrySdkBenchmarksActivity.cs b/test/Benchmarks/Trace/ActivityCreationBenchmarks.cs similarity index 62% rename from test/Benchmarks/Trace/OpenTelemetrySdkBenchmarksActivity.cs rename to test/Benchmarks/Trace/ActivityCreationBenchmarks.cs index 0793750c100..6f25c466ac6 100644 --- a/test/Benchmarks/Trace/OpenTelemetrySdkBenchmarksActivity.cs +++ b/test/Benchmarks/Trace/ActivityCreationBenchmarks.cs @@ -1,4 +1,4 @@ -// +// // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,27 +21,25 @@ using OpenTelemetry.Trace; /* -// * Summary * +BenchmarkDotNet v0.13.10, Windows 11 (10.0.23424.1000) +Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 -BenchmarkDotNet=v0.13.2, OS=Windows 10 (10.0.19044.2130/21H2/November2021Update) -Intel Core i7-4790 CPU 3.60GHz (Haswell), 1 CPU, 8 logical and 4 physical cores -.NET SDK=7.0.100-preview.7.22377.5 - [Host] : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2 - DefaultJob : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2 - -| Method | Mean | Error | StdDev | Gen0 | Allocated | -|--------------------------------------------------------- |---------:|--------:|--------:|-------:|----------:| -| CreateActivity_NoopProcessor | 457.9 ns | 1.39 ns | 1.23 ns | 0.0992 | 416 B | -| CreateActivity_WithParentContext_NoopProcessor | 104.8 ns | 0.43 ns | 0.36 ns | - | - | -| CreateActivity_WithParentId_NoopProcessor | 221.9 ns | 0.44 ns | 0.39 ns | 0.0343 | 144 B | -| CreateActivity_WithAttributes_NoopProcessor | 541.4 ns | 3.32 ns | 2.94 ns | 0.1488 | 624 B | -| CreateActiviti_WithKind_NoopProcessor | 437.5 ns | 2.05 ns | 1.92 ns | 0.0992 | 416 B | +| Method | Mean | Error | StdDev | Gen0 | Allocated | +|----------------------------------------------- |----------:|---------:|---------:|-------:|----------:| +| CreateActivity_NoopProcessor | 307.12 ns | 5.769 ns | 6.172 ns | 0.0663 | 416 B | +| CreateActivity_WithParentContext_NoopProcessor | 75.18 ns | 0.399 ns | 0.354 ns | - | - | +| CreateActivity_WithParentId_NoopProcessor | 156.52 ns | 1.609 ns | 1.426 ns | 0.0229 | 144 B | +| CreateActivity_WithAttributes_NoopProcessor | 372.34 ns | 6.215 ns | 4.852 ns | 0.0992 | 624 B | +| CreateActivity_WithKind_NoopProcessor | 302.24 ns | 5.859 ns | 8.402 ns | 0.0663 | 416 B | */ namespace Benchmarks.Trace; -public class OpenTelemetrySdkBenchmarksActivity +public class ActivityCreationBenchmarks { private readonly ActivitySource benchmarkSource = new("Benchmark"); private readonly ActivityContext parentCtx = new(ActivityTraceId.CreateRandom(), ActivitySpanId.CreateRandom(), ActivityTraceFlags.None); @@ -76,5 +74,5 @@ public void GlobalCleanup() public void CreateActivity_WithAttributes_NoopProcessor() => ActivityCreationScenarios.CreateActivityWithAttributes(this.benchmarkSource); [Benchmark] - public void CreateActiviti_WithKind_NoopProcessor() => ActivityCreationScenarios.CreateActivityWithKind(this.benchmarkSource); + public void CreateActivity_WithKind_NoopProcessor() => ActivityCreationScenarios.CreateActivityWithKind(this.benchmarkSource); } diff --git a/test/Benchmarks/Trace/SamplerBenchmarks.cs b/test/Benchmarks/Trace/SamplerBenchmarks.cs index cccb62afe23..979680fb37f 100644 --- a/test/Benchmarks/Trace/SamplerBenchmarks.cs +++ b/test/Benchmarks/Trace/SamplerBenchmarks.cs @@ -20,21 +20,18 @@ using OpenTelemetry.Trace; /* -// * Summary * +BenchmarkDotNet v0.13.10, Windows 11 (10.0.23424.1000) +Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 -BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19044.1889 (21H2) -Intel Core i7-4790 CPU 3.60GHz (Haswell), 1 CPU, 8 logical and 4 physical cores -.NET SDK=7.0.100-preview.7.22377.5 - [Host] : .NET 6.0.8 (6.0.822.36306), X64 RyuJIT - DefaultJob : .NET 6.0.8 (6.0.822.36306), X64 RyuJIT - -| Method | Mean | Error | StdDev | Gen 0 | Allocated | +| Method | Mean | Error | StdDev | Gen0 | Allocated | |------------------------------ |---------:|--------:|--------:|-------:|----------:| -| SamplerNotModifyingTraceState | 398.6 ns | 7.48 ns | 7.68 ns | 0.0782 | 328 B | -| SamplerModifyingTraceState | 411.8 ns | 2.38 ns | 2.11 ns | 0.0782 | 328 B | -| SamplerAppendingTraceState | 428.5 ns | 2.54 ns | 2.25 ns | 0.0916 | 384 B | - +| SamplerNotModifyingTraceState | 293.3 ns | 3.55 ns | 3.15 ns | 0.0520 | 328 B | +| SamplerModifyingTraceState | 289.4 ns | 5.64 ns | 6.27 ns | 0.0520 | 328 B | +| SamplerAppendingTraceState | 312.7 ns | 6.07 ns | 8.10 ns | 0.0610 | 384 B | */ namespace Benchmarks.Trace; diff --git a/test/Benchmarks/Trace/OpenTelemetrySdkBenchmarks.cs b/test/Benchmarks/Trace/SpanCreationBenchmarks.cs similarity index 64% rename from test/Benchmarks/Trace/OpenTelemetrySdkBenchmarks.cs rename to test/Benchmarks/Trace/SpanCreationBenchmarks.cs index bccf0f0478f..ae0a2e3d9b4 100644 --- a/test/Benchmarks/Trace/OpenTelemetrySdkBenchmarks.cs +++ b/test/Benchmarks/Trace/SpanCreationBenchmarks.cs @@ -1,4 +1,4 @@ -// +// // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,9 +19,31 @@ using OpenTelemetry; using OpenTelemetry.Trace; +/* +BenchmarkDotNet v0.13.10, Windows 11 (10.0.23424.1000) +Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + + +| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen0 | Allocated | +|--------------------------------- |-----------:|----------:|-----------:|------:|--------:|-------:|----------:| +| CreateSpan_Sampled | 357.256 ns | 2.1430 ns | 1.7895 ns | 61.41 | 0.40 | 0.0701 | 440 B | +| CreateSpan_ParentContext | 354.797 ns | 2.4225 ns | 2.2660 ns | 60.93 | 0.46 | 0.0787 | 496 B | +| CreateSpan_Attributes_Sampled | 460.082 ns | 8.7219 ns | 16.3818 ns | 81.52 | 2.88 | 0.1135 | 712 B | +| CreateSpan_WithSpan | 439.489 ns | 8.7722 ns | 21.3526 ns | 79.36 | 2.81 | 0.1030 | 648 B | +| CreateSpan_Active | 348.698 ns | 4.3437 ns | 3.8506 ns | 59.98 | 0.64 | 0.0701 | 440 B | +| CreateSpan_Active_GetCurrent | 357.866 ns | 7.1779 ns | 9.0777 ns | 62.41 | 1.51 | 0.0701 | 440 B | +| CreateSpan_Attributes_NotSampled | 360.546 ns | 3.6948 ns | 3.2753 ns | 61.96 | 0.63 | 0.0815 | 512 B | +| CreateSpan_Noop | 5.818 ns | 0.0248 ns | 0.0207 ns | 1.00 | 0.00 | - | - | +| CreateSpan_Attributes_Noop | 15.953 ns | 0.3446 ns | 0.3539 ns | 2.75 | 0.07 | 0.0115 | 72 B | +| CreateSpan_Propagate_Noop | 12.320 ns | 0.2486 ns | 0.2326 ns | 2.12 | 0.04 | - | - | +*/ + namespace Benchmarks.Trace; -public class OpenTelemetrySdkBenchmarks +public class SpanCreationBenchmarks { private Tracer alwaysSampleTracer; private Tracer neverSampleTracer; diff --git a/test/Benchmarks/Trace/TraceBenchmarks.cs b/test/Benchmarks/Trace/TraceBenchmarks.cs index 85ba5cd26f3..93024f73153 100644 --- a/test/Benchmarks/Trace/TraceBenchmarks.cs +++ b/test/Benchmarks/Trace/TraceBenchmarks.cs @@ -20,29 +20,26 @@ using OpenTelemetry.Trace; /* -// * Summary * +BenchmarkDotNet v0.13.10, Windows 11 (10.0.23424.1000) +Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 -BenchmarkDotNet=v0.13.2, OS=Windows 10 (10.0.19044.2130/21H2/November2021Update) -Intel Core i7-4790 CPU 3.60GHz(Haswell), 1 CPU, 8 logical and 4 physical cores -.NET SDK= 7.0.100-preview.7.22377.5 - [Host] : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2 - DefaultJob : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2 - -| Method | Mean | Error | StdDev | Gen0 | Allocated | +| Method | Mean | Error | StdDev | Gen0 | Allocated | |--------------------------------- |----------:|---------:|---------:|-------:|----------:| -| NoListener | 20.86 ns | 0.379 ns | 0.336 ns | - | - | -| PropagationDataListner | 376.51 ns | 1.361 ns | 1.273 ns | 0.0992 | 416 B | -| AllDataListner | 377.38 ns | 2.715 ns | 2.407 ns | 0.0992 | 416 B | -| AllDataAndRecordedListner | 375.79 ns | 3.393 ns | 3.008 ns | 0.0992 | 416 B | -| OneProcessor | 432.98 ns | 1.562 ns | 1.461 ns | 0.0992 | 416 B | -| TwoProcessors | 430.16 ns | 2.538 ns | 2.250 ns | 0.0992 | 416 B | -| ThreeProcessors | 427.39 ns | 3.243 ns | 2.875 ns | 0.0992 | 416 B | -| OneInstrumentation | 411.56 ns | 2.310 ns | 2.161 ns | 0.0992 | 416 B | -| TwoInstrumentations | 422.27 ns | 3.304 ns | 2.929 ns | 0.0992 | 416 B | -| LegacyActivity_ExactMatchMode | 726.59 ns | 4.852 ns | 4.301 ns | 0.0992 | 416 B | -| LegacyActivity_WildcardMatchMode | 825.79 ns | 7.846 ns | 6.955 ns | 0.0992 | 416 B | - +| NoListener | 14.00 ns | 0.173 ns | 0.162 ns | - | - | +| PropagationDataListner | 265.96 ns | 4.022 ns | 3.762 ns | 0.0663 | 416 B | +| AllDataListner | 255.14 ns | 1.819 ns | 1.702 ns | 0.0663 | 416 B | +| AllDataAndRecordedListner | 258.32 ns | 2.387 ns | 2.116 ns | 0.0663 | 416 B | +| OneProcessor | 277.12 ns | 2.059 ns | 1.926 ns | 0.0663 | 416 B | +| TwoProcessors | 276.82 ns | 4.442 ns | 4.155 ns | 0.0663 | 416 B | +| ThreeProcessors | 283.12 ns | 1.970 ns | 1.645 ns | 0.0663 | 416 B | +| OneInstrumentation | 281.13 ns | 2.199 ns | 2.057 ns | 0.0663 | 416 B | +| TwoInstrumentations | 273.99 ns | 2.792 ns | 2.475 ns | 0.0663 | 416 B | +| LegacyActivity_ExactMatchMode | 471.38 ns | 2.211 ns | 1.960 ns | 0.0658 | 416 B | +| LegacyActivity_WildcardMatchMode | 496.84 ns | 2.138 ns | 2.000 ns | 0.0658 | 416 B | */ namespace Benchmarks.Trace; diff --git a/test/Benchmarks/Trace/TraceShimBenchmarks.cs b/test/Benchmarks/Trace/TraceShimBenchmarks.cs index 57086fcbc1e..781b8c99096 100644 --- a/test/Benchmarks/Trace/TraceShimBenchmarks.cs +++ b/test/Benchmarks/Trace/TraceShimBenchmarks.cs @@ -19,6 +19,22 @@ using OpenTelemetry; using OpenTelemetry.Trace; +/* +BenchmarkDotNet v0.13.10, Windows 11 (10.0.23424.1000) +Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + DefaultJob : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + + +| Method | Mean | Error | StdDev | Gen0 | Allocated | +|---------------- |-----------:|----------:|----------:|-------:|----------:| +| NoListener | 5.322 ns | 0.0314 ns | 0.0262 ns | - | - | +| OneProcessor | 326.566 ns | 3.4034 ns | 3.0170 ns | 0.0701 | 440 B | +| TwoProcessors | 335.646 ns | 3.8341 ns | 3.3988 ns | 0.0701 | 440 B | +| ThreeProcessors | 336.069 ns | 6.5628 ns | 8.5335 ns | 0.0701 | 440 B | +*/ + namespace Benchmarks.Trace; public class TraceShimBenchmarks