-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor refactor of BatchingSink
#4402
Conversation
d580aaa
to
2c49a99
Compare
Datadog ReportBranch report: ❄️ New Flaky Tests (2)
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
tracer/src/Datadog.Trace/Logging/DirectSubmission/Sink/DirectSubmissionLogSink.cs
Outdated
Show resolved
Hide resolved
8fab463
to
8f66709
Compare
2c49a99
to
4c40e4c
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
be1d089
to
db5057c
Compare
4c40e4c
to
d317112
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Throughput/Crank Report:zap:Throughput results for AspNetCoreSimpleController comparing the following branches/commits: Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red. Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards! gantt
title Throughput Linux x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4402) (11.316M) : 0, 11316206
master (11.346M) : 0, 11346232
benchmarks/2.33.0 (10.950M) : 0, 10949608
benchmarks/2.9.0 (11.208M) : 0, 11207974
section Automatic
This PR (4402) (7.878M) : 0, 7877830
master (7.835M) : 0, 7835027
benchmarks/2.33.0 (7.621M) : 0, 7620707
benchmarks/2.9.0 (8.183M) : 0, 8183469
section Trace stats
master (7.934M) : 0, 7934441
benchmarks/2.33.0 (7.602M) : 0, 7602038
section Manual
This PR (4402) (10.045M) : 0, 10044983
master (10.162M) : 0, 10162267
benchmarks/2.33.0 (9.770M) : 0, 9770235
section Manual + Automatic
This PR (4402) (7.629M) : 0, 7628682
master (7.595M) : 0, 7595401
benchmarks/2.33.0 (7.189M) : 0, 7188658
section Version Conflict
master (6.823M) : 0, 6822653
benchmarks/2.33.0 (6.553M) : 0, 6553316
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4402) (9.593M) : 0, 9592992
master (9.759M) : 0, 9758817
benchmarks/2.33.0 (9.426M) : 0, 9425603
benchmarks/2.9.0 (9.560M) : 0, 9560392
section Automatic
This PR (4402) (6.750M) : 0, 6750166
master (6.577M) : 0, 6576650
benchmarks/2.33.0 (6.803M) : 0, 6802932
section Trace stats
master (6.732M) : 0, 6731910
benchmarks/2.33.0 (6.810M) : 0, 6810447
section Manual
This PR (4402) (8.442M) : 0, 8441807
master (8.645M) : 0, 8645166
benchmarks/2.33.0 (8.435M) : 0, 8434569
section Manual + Automatic
This PR (4402) (6.437M) : 0, 6437017
master (6.478M) : 0, 6478309
benchmarks/2.33.0 (6.465M) : 0, 6465149
section Version Conflict
master (6.010M) : 0, 6009663
benchmarks/2.33.0 (5.807M) : 0, 5806690
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4402) (9.924M) : 0, 9923998
master (10.834M) : 0, 10834218
benchmarks/2.33.0 (9.426M) : 0, 9426080
benchmarks/2.9.0 (10.159M) : 0, 10158802
section Automatic
This PR (4402) (7.133M) : crit ,0, 7133063
master (7.787M) : 0, 7786725
benchmarks/2.33.0 (6.469M) : 0, 6468939
benchmarks/2.9.0 (7.476M) : 0, 7476188
section Trace stats
master (7.331M) : 0, 7330898
benchmarks/2.33.0 (6.830M) : 0, 6830314
section Manual
This PR (4402) (9.001M) : 0, 9000893
master (9.223M) : 0, 9222794
benchmarks/2.33.0 (8.108M) : 0, 8108026
section Manual + Automatic
This PR (4402) (6.937M) : 0, 6936895
master (7.256M) : 0, 7255836
benchmarks/2.33.0 (6.856M) : 0, 6856379
section Version Conflict
master (6.759M) : 0, 6758545
benchmarks/2.33.0 (5.893M) : 0, 5893016
gantt
title Throughput Linux x64 (ASM) (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (4402) (7.511M) : 0, 7510767
master (7.523M) : 0, 7522826
benchmarks/2.33.0 (7.765M) : 0, 7764607
benchmarks/2.9.0 (7.668M) : 0, 7667875
section No attack
This PR (4402) (2.130M) : 0, 2130475
master (2.165M) : 0, 2165309
benchmarks/2.33.0 (2.209M) : 0, 2208725
benchmarks/2.9.0 (3.135M) : 0, 3135187
section Attack
This PR (4402) (1.851M) : 0, 1850924
master (1.840M) : 0, 1839905
benchmarks/2.33.0 (1.911M) : 0, 1910909
benchmarks/2.9.0 (2.534M) : 0, 2533760
section Blocking
This PR (4402) (3.742M) : 0, 3742427
master (3.756M) : 0, 3756223
benchmarks/2.33.0 (3.861M) : 0, 3860900
|
db5057c
to
863ec1b
Compare
As we are going to have more than one "sink" soon!
d317112
to
7d4359a
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4402) - mean (3,016ms) : 2909, 3124
. : milestone, 3016,
master - mean (3,006ms) : 2948, 3063
. : milestone, 3006,
section CallTarget+Inlining+NGEN
This PR (4402) - mean (3,817ms) : 3758, 3876
. : milestone, 3817,
master - mean (3,828ms) : 3721, 3934
. : milestone, 3828,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4402) - mean (3,110ms) : 3005, 3214
. : milestone, 3110,
master - mean (3,110ms) : 3026, 3193
. : milestone, 3110,
section CallTarget+Inlining+NGEN
This PR (4402) - mean (3,608ms) : 3567, 3650
. : milestone, 3608,
master - mean (3,610ms) : 3532, 3687
. : milestone, 3610,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4402) - mean (3,118ms) : 3019, 3216
. : milestone, 3118,
master - mean (3,106ms) : 3016, 3196
. : milestone, 3106,
section CallTarget+Inlining+NGEN
This PR (4402) - mean (3,590ms) : 3496, 3683
. : milestone, 3590,
master - mean (3,569ms) : 3513, 3625
. : milestone, 3569,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4402) - mean (190ms) : 187, 194
. : milestone, 190,
master - mean (191ms) : 185, 196
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (4402) - mean (1,122ms) : 1089, 1156
. : milestone, 1122,
master - mean (1,124ms) : 1091, 1157
. : milestone, 1124,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4402) - mean (373ms) : 366, 379
. : milestone, 373,
master - mean (376ms) : 370, 382
. : milestone, 376,
section CallTarget+Inlining+NGEN
This PR (4402) - mean (1,178ms) : 1155, 1202
. : milestone, 1178,
master - mean (1,192ms) : 1168, 1216
. : milestone, 1192,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (4402) - mean (360ms) : 356, 365
. : milestone, 360,
master - mean (361ms) : 355, 367
. : milestone, 361,
section CallTarget+Inlining+NGEN
This PR (4402) - mean (1,131ms) : 1108, 1154
. : milestone, 1131,
master - mean (1,136ms) : 1111, 1161
. : milestone, 1136,
|
Benchmarks Report 🐌Benchmarks for #4402 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 | 41.94 KB | 41.56 KB | -380 B | -0.91% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 519μs | 504ns | 1.95μs | 0.512 | 0 | 0 | 41.58 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 629μs | 1.05μs | 4.09μs | 0.308 | 0 | 0 | 41.94 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 801μs | 3.91μs | 16.6μs | 8.36 | 2.39 | 0.398 | 53.23 KB |
#4402 | WriteAndFlushEnrichedTraces |
net6.0 | 533μs | 301ns | 1.13μs | 0.768 | 0 | 0 | 41.74 KB |
#4402 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 615μs | 2.36μs | 9.14μs | 0.308 | 0 | 0 | 41.56 KB |
#4402 | WriteAndFlushEnrichedTraces |
net472 | 773μs | 3.16μs | 12.2μs | 8.33 | 2.65 | 0.379 | 53.23 KB |
Benchmarks.Trace.DbCommandBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #4402
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0
1.125
982.98
873.64
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery‑net6.0 | 1.125 | 982.98 | 873.64 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteNonQuery |
net6.0 | 983ns | 0.237ns | 0.919ns | 0.0109 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.24μs | 0.467ns | 1.81ns | 0.0106 | 0 | 0 | 768 B |
master | ExecuteNonQuery |
net472 | 1.49μs | 0.538ns | 2.08ns | 0.116 | 0 | 0 | 730 B |
#4402 | ExecuteNonQuery |
net6.0 | 873ns | 0.546ns | 2.12ns | 0.0107 | 0 | 0 | 768 B |
#4402 | ExecuteNonQuery |
netcoreapp3.1 | 1.29μs | 0.451ns | 1.75ns | 0.0103 | 0 | 0 | 768 B |
#4402 | ExecuteNonQuery |
net472 | 1.46μs | 2.15ns | 8.34ns | 0.116 | 0.000725 | 0 | 730 B |
Benchmarks.Trace.ElasticsearchBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #4402
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0
1.153
1,030.63
1,188.28
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.153 | 1,030.63 | 1,188.28 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.03μs | 0.324ns | 1.21ns | 0.014 | 0 | 0 | 992 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.35μs | 0.29ns | 1.09ns | 0.0134 | 0 | 0 | 992 B |
master | CallElasticsearch |
net472 | 2.05μs | 0.64ns | 2.4ns | 0.159 | 0.00103 | 0 | 1 KB |
master | CallElasticsearchAsync |
net6.0 | 1.04μs | 0.384ns | 1.44ns | 0.0135 | 0 | 0 | 968 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.48μs | 0.52ns | 1.94ns | 0.0139 | 0 | 0 | 1.04 KB |
master | CallElasticsearchAsync |
net472 | 2.33μs | 0.626ns | 2.26ns | 0.168 | 0.00117 | 0 | 1.06 KB |
#4402 | CallElasticsearch |
net6.0 | 1.19μs | 0.44ns | 1.7ns | 0.0138 | 0 | 0 | 992 B |
#4402 | CallElasticsearch |
netcoreapp3.1 | 1.36μs | 0.535ns | 2.07ns | 0.0135 | 0 | 0 | 992 B |
#4402 | CallElasticsearch |
net472 | 2.04μs | 0.661ns | 2.56ns | 0.159 | 0.00102 | 0 | 1 KB |
#4402 | CallElasticsearchAsync |
net6.0 | 1.07μs | 0.321ns | 1.24ns | 0.0134 | 0 | 0 | 968 B |
#4402 | CallElasticsearchAsync |
netcoreapp3.1 | 1.45μs | 0.513ns | 1.99ns | 0.0139 | 0 | 0 | 1.04 KB |
#4402 | CallElasticsearchAsync |
net472 | 2.2μs | 0.4ns | 1.55ns | 0.168 | 0.00111 | 0 | 1.06 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.14μs | 0.372ns | 1.44ns | 0.0124 | 0 | 0 | 912 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.38μs | 0.72ns | 2.69ns | 0.0122 | 0 | 0 | 912 B |
master | ExecuteAsync |
net472 | 1.52μs | 0.494ns | 1.85ns | 0.139 | 0.000757 | 0 | 875 B |
#4402 | ExecuteAsync |
net6.0 | 1.14μs | 0.218ns | 0.816ns | 0.0125 | 0 | 0 | 912 B |
#4402 | ExecuteAsync |
netcoreapp3.1 | 1.33μs | 0.974ns | 3.77ns | 0.0126 | 0 | 0 | 912 B |
#4402 | ExecuteAsync |
net472 | 1.49μs | 0.384ns | 1.44ns | 0.139 | 0.000747 | 0 | 875 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendAsync |
net6.0 | 3.64μs | 1.39ns | 5.19ns | 0.0273 | 0 | 0 | 1.94 KB |
master | SendAsync |
netcoreapp3.1 | 4.42μs | 0.774ns | 2.9ns | 0.0329 | 0 | 0 | 2.48 KB |
master | SendAsync |
net472 | 6.92μs | 2.31ns | 8.63ns | 0.481 | 0 | 0 | 3.05 KB |
#4402 | SendAsync |
net6.0 | 3.59μs | 0.903ns | 3.5ns | 0.0269 | 0 | 0 | 1.94 KB |
#4402 | SendAsync |
netcoreapp3.1 | 4.48μs | 4.03ns | 15.6ns | 0.033 | 0 | 0 | 2.48 KB |
#4402 | SendAsync |
net472 | 6.83μs | 1.97ns | 7.37ns | 0.484 | 0 | 0 | 3.05 KB |
Benchmarks.Trace.ILoggerBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #4402
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑netcoreapp3.1
1.150
2,056.22
1,788.75
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ILoggerBenchmark.EnrichedLog‑netcoreapp3.1 | 1.150 | 2,056.22 | 1,788.75 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.29μs | 0.829ns | 3.21ns | 0.0224 | 0 | 0 | 1.62 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.06μs | 1.31ns | 4.92ns | 0.0217 | 0 | 0 | 1.62 KB |
master | EnrichedLog |
net472 | 2.27μs | 2.92ns | 10.9ns | 0.244 | 0 | 0 | 1.54 KB |
#4402 | EnrichedLog |
net6.0 | 1.34μs | 0.845ns | 3.16ns | 0.0231 | 0 | 0 | 1.62 KB |
#4402 | EnrichedLog |
netcoreapp3.1 | 1.79μs | 1ns | 3.87ns | 0.0224 | 0 | 0 | 1.62 KB |
#4402 | EnrichedLog |
net472 | 2.29μs | 1.64ns | 6.35ns | 0.245 | 0 | 0 | 1.54 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 111μs | 175ns | 679ns | 0.0561 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
netcoreapp3.1 | 117μs | 139ns | 519ns | 0 | 0 | 0 | 4.21 KB |
master | EnrichedLog |
net472 | 146μs | 164ns | 614ns | 0.655 | 0.218 | 0 | 4.38 KB |
#4402 | EnrichedLog |
net6.0 | 111μs | 142ns | 533ns | 0.0553 | 0 | 0 | 4.21 KB |
#4402 | EnrichedLog |
netcoreapp3.1 | 116μs | 255ns | 989ns | 0.0577 | 0 | 0 | 4.21 KB |
#4402 | EnrichedLog |
net472 | 145μs | 122ns | 471ns | 0.654 | 0.218 | 0 | 4.38 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.74μs | 1.27ns | 4.74ns | 0.0299 | 0 | 0 | 2.18 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.82μs | 1.4ns | 5.22ns | 0.0286 | 0 | 0 | 2.18 KB |
master | EnrichedLog |
net472 | 4.42μs | 1.72ns | 6.65ns | 0.314 | 0 | 0 | 1.99 KB |
#4402 | EnrichedLog |
net6.0 | 2.91μs | 0.572ns | 2.14ns | 0.0306 | 0 | 0 | 2.18 KB |
#4402 | EnrichedLog |
netcoreapp3.1 | 3.74μs | 1.27ns | 4.91ns | 0.0281 | 0 | 0 | 2.18 KB |
#4402 | EnrichedLog |
net472 | 4.6μs | 3.08ns | 11.9ns | 0.314 | 0 | 0 | 1.99 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 1.27μs | 0.574ns | 2.07ns | 0.0164 | 0 | 0 | 1.16 KB |
master | SendReceive |
netcoreapp3.1 | 1.56μs | 0.611ns | 2.29ns | 0.0156 | 0 | 0 | 1.16 KB |
master | SendReceive |
net472 | 1.78μs | 2.84ns | 11ns | 0.184 | 0.000898 | 0 | 1.16 KB |
#4402 | SendReceive |
net6.0 | 1.27μs | 0.5ns | 1.87ns | 0.0165 | 0 | 0 | 1.16 KB |
#4402 | SendReceive |
netcoreapp3.1 | 1.51μs | 2.51ns | 9.38ns | 0.0156 | 0 | 0 | 1.16 KB |
#4402 | SendReceive |
net472 | 1.77μs | 0.808ns | 3.02ns | 0.184 | 0 | 0 | 1.16 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.5μs | 0.927ns | 3.59ns | 0.0215 | 0 | 0 | 1.53 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.52μs | 1.72ns | 6.44ns | 0.0215 | 0 | 0 | 1.58 KB |
master | EnrichedLog |
net472 | 4.01μs | 1.47ns | 5.49ns | 0.31 | 0 | 0 | 1.96 KB |
#4402 | EnrichedLog |
net6.0 | 2.55μs | 0.595ns | 2.23ns | 0.0217 | 0 | 0 | 1.53 KB |
#4402 | EnrichedLog |
netcoreapp3.1 | 3.5μs | 1.59ns | 5.94ns | 0.021 | 0 | 0 | 1.58 KB |
#4402 | EnrichedLog |
net472 | 3.92μs | 0.827ns | 3.2ns | 0.31 | 0 | 0 | 1.96 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #4402
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1
1.180
530.47
626.18
Faster 🎉 in #4402
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.313
498.67
379.78
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.117
766.55
686.14
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑netcoreapp3.1 | 1.180 | 530.47 | 626.18 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.313 | 498.67 | 379.78 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.117 | 766.55 | 686.14 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 499ns | 0.198ns | 0.743ns | 0.00744 | 0 | 0 | 536 B |
master | StartFinishSpan |
netcoreapp3.1 | 530ns | 0.261ns | 0.976ns | 0.00737 | 0 | 0 | 536 B |
master | StartFinishSpan |
net472 | 614ns | 0.486ns | 1.88ns | 0.0854 | 0 | 0 | 538 B |
master | StartFinishScope |
net6.0 | 518ns | 0.191ns | 0.714ns | 0.00931 | 0 | 0 | 656 B |
master | StartFinishScope |
netcoreapp3.1 | 767ns | 0.218ns | 0.846ns | 0.00885 | 0 | 0 | 656 B |
master | StartFinishScope |
net472 | 771ns | 0.497ns | 1.93ns | 0.0981 | 0 | 0 | 618 B |
#4402 | StartFinishSpan |
net6.0 | 380ns | 0.124ns | 0.465ns | 0.00758 | 0 | 0 | 536 B |
#4402 | StartFinishSpan |
netcoreapp3.1 | 626ns | 0.22ns | 0.825ns | 0.00716 | 0 | 0 | 536 B |
#4402 | StartFinishSpan |
net472 | 662ns | 2.1ns | 8.13ns | 0.0852 | 0 | 0 | 538 B |
#4402 | StartFinishScope |
net6.0 | 471ns | 1.16ns | 4.19ns | 0.00911 | 0 | 0 | 656 B |
#4402 | StartFinishScope |
netcoreapp3.1 | 687ns | 0.649ns | 3.95ns | 0.00898 | 0 | 0 | 656 B |
#4402 | StartFinishScope |
net472 | 775ns | 0.303ns | 1.17ns | 0.0981 | 0 | 0 | 618 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 562ns | 0.0877ns | 0.304ns | 0.00933 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 787ns | 0.26ns | 1.01ns | 0.00893 | 0 | 0 | 656 B |
master | RunOnMethodBegin |
net472 | 928ns | 0.79ns | 2.96ns | 0.098 | 0 | 0 | 618 B |
#4402 | RunOnMethodBegin |
net6.0 | 549ns | 0.121ns | 0.437ns | 0.00918 | 0 | 0 | 656 B |
#4402 | RunOnMethodBegin |
netcoreapp3.1 | 870ns | 0.287ns | 1.07ns | 0.00886 | 0 | 0 | 656 B |
#4402 | RunOnMethodBegin |
net472 | 931ns | 0.123ns | 0.459ns | 0.098 | 0 | 0 | 618 B |
* Refactor BatchingSink<T> so we can reuse it with telemetry logs * minor: rename DatadogSink to DirectSubmissionLogSink As we are going to have more than one "sink" soon! * Rename DatadogLogEvent -> DirectSubmissionLogEvent
Summary of changes
BatchingSink
to support genericT
events, instead of only direct-submission logsDatadogSink
toDirectSubmissionLogSink
Reason for change
When sending telemetry logs, we want to reuse the
BatchingSink
implementation, but currently it's tied to direct log submission.Renaming the derived
DatadogSink
to be clearer about what it isImplementation details
A few minor tweaks to
BatchingSink
and a renameTest coverage
A few unit tests for the new
CloseImmediately()
method, but otherwise covered by existing testsOther details
Stacked on #4388