-
Notifications
You must be signed in to change notification settings - Fork 137
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
Clean dangling AgentWriter instances in unit tests #5311
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 326805 Passed, 1590 Skipped, 35m 40.96s Wall Time |
return new ScopedTracer(settings, Mock.Of<IAgentWriter>()); | ||
} | ||
|
||
public class ScopedTracer : Tracer, IDisposable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice 👍
public static ScopedTracer CreateWithFakeAgent( | ||
TracerSettings settings = null) | ||
{ | ||
return new ScopedTracer(settings, Mock.Of<IAgentWriter>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kinda feel like this should probably be the default in the TracerHelper
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I'm 50/50 on this one. "agent disabled by default" is the best choice from a performance perspective, but "agent enabled by default" is the path of least surprise.
public void Dispose() | ||
{ | ||
TracerManager.ShutdownAsync().GetAwaiter().GetResult(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shame we can't use DisposeAsync()
because of .NET FX 🙁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though maybe we can shim it 🤔
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 (5311) - mean (72ms) : 65, 78
. : milestone, 72,
master - mean (73ms) : 65, 80
. : milestone, 73,
section CallTarget+Inlining+NGEN
This PR (5311) - mean (1,001ms) : 980, 1023
. : milestone, 1001,
master - mean (996ms) : 974, 1017
. : milestone, 996,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5311) - mean (110ms) : 107, 113
. : milestone, 110,
master - mean (110ms) : 106, 113
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5311) - mean (717ms) : 699, 736
. : milestone, 717,
master - mean (717ms) : 695, 739
. : milestone, 717,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5311) - mean (95ms) : 92, 97
. : milestone, 95,
master - mean (93ms) : 90, 96
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (5311) - mean (672ms) : 649, 695
. : milestone, 672,
master - mean (670ms) : 653, 687
. : milestone, 670,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5311) - mean (188ms) : 183, 192
. : milestone, 188,
master - mean (187ms) : 183, 191
. : milestone, 187,
section CallTarget+Inlining+NGEN
This PR (5311) - mean (1,080ms) : 1052, 1108
. : milestone, 1080,
master - mean (1,070ms) : 1047, 1092
. : milestone, 1070,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5311) - mean (273ms) : 263, 284
. : milestone, 273,
master - mean (270ms) : 266, 275
. : milestone, 270,
section CallTarget+Inlining+NGEN
This PR (5311) - mean (878ms) : 850, 906
. : milestone, 878,
master - mean (876ms) : 854, 898
. : milestone, 876,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5311) - mean (260ms) : 257, 264
. : milestone, 260,
master - mean (259ms) : 253, 264
. : milestone, 259,
section CallTarget+Inlining+NGEN
This PR (5311) - mean (855ms) : 830, 880
. : milestone, 855,
master - mean (858ms) : 824, 891
. : milestone, 858,
|
Benchmarks Report for tracer 🐌Benchmarks for #5311 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - 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.96 KB | 41.68 KB | -275 B | -0.66% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 547μs | 223ns | 864ns | 0.541 | 0 | 0 | 41.79 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 647μs | 885ns | 3.31μs | 0.322 | 0 | 0 | 41.96 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 875μs | 2.4μs | 8.97μs | 8.19 | 2.59 | 0.431 | 53.24 KB |
#5311 | WriteAndFlushEnrichedTraces |
net6.0 | 551μs | 639ns | 2.47μs | 0.543 | 0 | 0 | 41.76 KB |
#5311 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 678μs | 1.05μs | 4.07μs | 0.334 | 0 | 0 | 41.68 KB |
#5311 | WriteAndFlushEnrichedTraces |
net472 | 862μs | 4.41μs | 20.7μs | 8.19 | 2.59 | 0.431 | 53.23 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteNonQuery |
net6.0 | 1.1μs | 0.722ns | 2.79ns | 0.0109 | 0 | 0 | 784 B |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.47μs | 1.98ns | 7.66ns | 0.0102 | 0 | 0 | 784 B |
master | ExecuteNonQuery |
net472 | 1.83μs | 0.749ns | 2.8ns | 0.118 | 0 | 0 | 746 B |
#5311 | ExecuteNonQuery |
net6.0 | 1.2μs | 0.735ns | 2.75ns | 0.0108 | 0 | 0 | 784 B |
#5311 | ExecuteNonQuery |
netcoreapp3.1 | 1.49μs | 1.11ns | 4.31ns | 0.0105 | 0 | 0 | 784 B |
#5311 | ExecuteNonQuery |
net472 | 1.76μs | 0.814ns | 3.15ns | 0.118 | 0 | 0 | 746 B |
Benchmarks.Trace.ElasticsearchBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5311
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0
1.128
1,417.77
1,257.44
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync‑net6.0 | 1.128 | 1,417.77 | 1,257.44 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.28μs | 0.789ns | 3.06ns | 0.0142 | 0 | 0 | 1.01 KB |
master | CallElasticsearch |
netcoreapp3.1 | 1.58μs | 0.532ns | 1.99ns | 0.0134 | 0 | 0 | 1.01 KB |
master | CallElasticsearch |
net472 | 2.55μs | 2.16ns | 8.35ns | 0.161 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net6.0 | 1.42μs | 0.888ns | 3.44ns | 0.0142 | 0 | 0 | 984 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.67μs | 0.75ns | 2.9ns | 0.0141 | 0 | 0 | 1.06 KB |
master | CallElasticsearchAsync |
net472 | 2.58μs | 1.19ns | 4.61ns | 0.17 | 0 | 0 | 1.08 KB |
#5311 | CallElasticsearch |
net6.0 | 1.24μs | 0.625ns | 2.34ns | 0.014 | 0 | 0 | 1.01 KB |
#5311 | CallElasticsearch |
netcoreapp3.1 | 1.71μs | 0.688ns | 2.48ns | 0.0138 | 0 | 0 | 1.01 KB |
#5311 | CallElasticsearch |
net472 | 2.6μs | 6.35ns | 24.6ns | 0.161 | 0 | 0 | 1.02 KB |
#5311 | CallElasticsearchAsync |
net6.0 | 1.26μs | 0.789ns | 2.95ns | 0.0139 | 0 | 0 | 984 B |
#5311 | CallElasticsearchAsync |
netcoreapp3.1 | 1.64μs | 0.803ns | 3.01ns | 0.014 | 0 | 0 | 1.06 KB |
#5311 | CallElasticsearchAsync |
net472 | 2.56μs | 0.697ns | 2.51ns | 0.17 | 0 | 0 | 1.08 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.39μs | 0.845ns | 3.27ns | 0.0131 | 0 | 0 | 928 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.63μs | 1.38ns | 5.15ns | 0.0122 | 0 | 0 | 928 B |
master | ExecuteAsync |
net472 | 1.89μs | 1.01ns | 3.9ns | 0.141 | 0 | 0 | 891 B |
#5311 | ExecuteAsync |
net6.0 | 1.31μs | 1.01ns | 3.77ns | 0.0132 | 0 | 0 | 928 B |
#5311 | ExecuteAsync |
netcoreapp3.1 | 1.76μs | 0.693ns | 2.59ns | 0.0123 | 0 | 0 | 928 B |
#5311 | ExecuteAsync |
net472 | 1.92μs | 1.09ns | 4.07ns | 0.141 | 0 | 0 | 891 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 | 4.13μs | 1.6ns | 5.78ns | 0.0296 | 0 | 0 | 2.16 KB |
master | SendAsync |
netcoreapp3.1 | 5.16μs | 2.69ns | 10.1ns | 0.0363 | 0 | 0 | 2.7 KB |
master | SendAsync |
net472 | 7.68μs | 6.12ns | 22.9ns | 0.535 | 0 | 0 | 3.38 KB |
#5311 | SendAsync |
net6.0 | 4.18μs | 1.4ns | 5.23ns | 0.0293 | 0 | 0 | 2.16 KB |
#5311 | SendAsync |
netcoreapp3.1 | 4.87μs | 2.06ns | 7.69ns | 0.0366 | 0 | 0 | 2.7 KB |
#5311 | SendAsync |
net472 | 7.9μs | 2.32ns | 8.7ns | 0.534 | 0 | 0 | 3.38 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.52μs | 0.548ns | 1.98ns | 0.0231 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.15μs | 0.689ns | 2.58ns | 0.0223 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 2.67μs | 0.691ns | 2.68ns | 0.249 | 0 | 0 | 1.57 KB |
#5311 | EnrichedLog |
net6.0 | 1.47μs | 0.757ns | 2.93ns | 0.0234 | 0 | 0 | 1.65 KB |
#5311 | EnrichedLog |
netcoreapp3.1 | 2.3μs | 3.39ns | 12.7ns | 0.0222 | 0 | 0 | 1.65 KB |
#5311 | EnrichedLog |
net472 | 2.55μs | 2.11ns | 8.17ns | 0.25 | 0 | 0 | 1.57 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 | 54.2ns | 203ns | 0.056 | 0 | 0 | 4.23 KB |
master | EnrichedLog |
netcoreapp3.1 | 118μs | 216ns | 838ns | 0 | 0 | 0 | 4.23 KB |
master | EnrichedLog |
net472 | 147μs | 170ns | 660ns | 0.656 | 0.219 | 0 | 4.41 KB |
#5311 | EnrichedLog |
net6.0 | 112μs | 70.6ns | 264ns | 0.0568 | 0 | 0 | 4.23 KB |
#5311 | EnrichedLog |
netcoreapp3.1 | 118μs | 134ns | 500ns | 0 | 0 | 0 | 4.23 KB |
#5311 | EnrichedLog |
net472 | 147μs | 242ns | 904ns | 0.655 | 0.218 | 0 | 4.41 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.92μs | 1.61ns | 5.82ns | 0.0305 | 0 | 0 | 2.21 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.33μs | 1.09ns | 3.78ns | 0.0303 | 0 | 0 | 2.21 KB |
master | EnrichedLog |
net472 | 5.01μs | 1.48ns | 5.32ns | 0.32 | 0 | 0 | 2.02 KB |
#5311 | EnrichedLog |
net6.0 | 3.04μs | 0.738ns | 2.66ns | 0.0303 | 0 | 0 | 2.21 KB |
#5311 | EnrichedLog |
netcoreapp3.1 | 4.13μs | 2.65ns | 10.3ns | 0.0289 | 0 | 0 | 2.21 KB |
#5311 | EnrichedLog |
net472 | 4.82μs | 2.68ns | 10.4ns | 0.321 | 0 | 0 | 2.02 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.45μs | 1.67ns | 6.49ns | 0.0167 | 0 | 0 | 1.18 KB |
master | SendReceive |
netcoreapp3.1 | 1.77μs | 0.994ns | 3.72ns | 0.0159 | 0 | 0 | 1.18 KB |
master | SendReceive |
net472 | 2.15μs | 0.835ns | 3.24ns | 0.187 | 0 | 0 | 1.18 KB |
#5311 | SendReceive |
net6.0 | 1.43μs | 1.56ns | 5.82ns | 0.0165 | 0 | 0 | 1.18 KB |
#5311 | SendReceive |
netcoreapp3.1 | 1.76μs | 2.27ns | 8.79ns | 0.0158 | 0 | 0 | 1.18 KB |
#5311 | SendReceive |
net472 | 2.22μs | 1.55ns | 6.01ns | 0.187 | 0 | 0 | 1.18 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.74μs | 0.848ns | 3.29ns | 0.0219 | 0 | 0 | 1.55 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.82μs | 1.61ns | 6.22ns | 0.0212 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
net472 | 4.48μs | 1.82ns | 6.81ns | 0.314 | 0 | 0 | 1.99 KB |
#5311 | EnrichedLog |
net6.0 | 2.72μs | 0.931ns | 3.61ns | 0.0219 | 0 | 0 | 1.55 KB |
#5311 | EnrichedLog |
netcoreapp3.1 | 3.77μs | 1.69ns | 6.1ns | 0.021 | 0 | 0 | 1.6 KB |
#5311 | EnrichedLog |
net472 | 4.56μs | 2.45ns | 8.85ns | 0.315 | 0 | 0 | 1.99 KB |
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5311
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0
1.128
587.69
521.09
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.128 | 587.69 | 521.09 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 584ns | 0.714ns | 2.67ns | 0.0077 | 0 | 0 | 552 B |
master | StartFinishSpan |
netcoreapp3.1 | 708ns | 1.43ns | 5.55ns | 0.00759 | 0 | 0 | 552 B |
master | StartFinishSpan |
net472 | 723ns | 1.25ns | 4.85ns | 0.0878 | 0 | 0 | 554 B |
master | StartFinishScope |
net6.0 | 587ns | 0.857ns | 3.32ns | 0.00936 | 0 | 0 | 672 B |
master | StartFinishScope |
netcoreapp3.1 | 897ns | 1.63ns | 6.09ns | 0.00892 | 0 | 0 | 672 B |
master | StartFinishScope |
net472 | 920ns | 1.55ns | 6.01ns | 0.101 | 0 | 0 | 634 B |
#5311 | StartFinishSpan |
net6.0 | 540ns | 1.15ns | 4.45ns | 0.00784 | 0 | 0 | 552 B |
#5311 | StartFinishSpan |
netcoreapp3.1 | 643ns | 1.36ns | 5.09ns | 0.00751 | 0 | 0 | 552 B |
#5311 | StartFinishSpan |
net472 | 736ns | 0.997ns | 3.86ns | 0.0879 | 0 | 0 | 554 B |
#5311 | StartFinishScope |
net6.0 | 522ns | 0.759ns | 2.94ns | 0.00944 | 0 | 0 | 672 B |
#5311 | StartFinishScope |
netcoreapp3.1 | 812ns | 1.12ns | 4.34ns | 0.00898 | 0 | 0 | 672 B |
#5311 | StartFinishScope |
net472 | 922ns | 1.37ns | 5.31ns | 0.101 | 0 | 0 | 634 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 | 619ns | 1.34ns | 5.19ns | 0.00951 | 0 | 0 | 672 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 961ns | 1.66ns | 6.43ns | 0.00884 | 0 | 0 | 672 B |
master | RunOnMethodBegin |
net472 | 1.06μs | 2.01ns | 7.77ns | 0.101 | 0 | 0 | 634 B |
#5311 | RunOnMethodBegin |
net6.0 | 685ns | 1.11ns | 4.31ns | 0.00945 | 0 | 0 | 672 B |
#5311 | RunOnMethodBegin |
netcoreapp3.1 | 995ns | 1.33ns | 4.98ns | 0.0089 | 0 | 0 | 672 B |
#5311 | RunOnMethodBegin |
net472 | 994ns | 1.56ns | 6.05ns | 0.1 | 0 | 0 | 634 B |
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 (5311) (11.004M) : 0, 11004238
master (11.325M) : 0, 11324667
benchmarks/2.9.0 (11.277M) : 0, 11277254
section Automatic
This PR (5311) (7.664M) : 0, 7664197
master (7.785M) : 0, 7785071
benchmarks/2.9.0 (7.986M) : 0, 7985594
section Trace stats
This PR (5311) (8.153M) : 0, 8152837
master (8.030M) : 0, 8029574
section Manual
This PR (5311) (9.700M) : 0, 9699591
master (9.790M) : 0, 9790118
section Manual + Automatic
This PR (5311) (7.360M) : 0, 7360183
master (7.255M) : 0, 7254615
section Version Conflict
This PR (5311) (6.594M) : 0, 6593572
master (6.649M) : 0, 6649451
gantt
title Throughput Linux arm64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5311) (9.624M) : 0, 9624477
master (9.499M) : 0, 9498796
benchmarks/2.9.0 (9.656M) : 0, 9655801
section Automatic
This PR (5311) (6.658M) : 0, 6657624
master (6.572M) : 0, 6571504
section Trace stats
This PR (5311) (6.767M) : 0, 6767321
master (6.781M) : 0, 6781384
section Manual
This PR (5311) (8.355M) : 0, 8354906
master (7.963M) : 0, 7962540
section Manual + Automatic
This PR (5311) (6.053M) : 0, 6052742
master (6.132M) : 0, 6132125
section Version Conflict
This PR (5311) (5.771M) : 0, 5771194
master (5.616M) : 0, 5616216
gantt
title Throughput Windows x64 (Total requests)
dateFormat X
axisFormat %s
section Baseline
This PR (5311) (9.864M) : 0, 9864200
master (9.851M) : 0, 9850836
benchmarks/2.9.0 (9.962M) : 0, 9961782
section Automatic
This PR (5311) (7.120M) : 0, 7120041
master (7.061M) : 0, 7060782
benchmarks/2.9.0 (7.328M) : 0, 7328264
section Trace stats
This PR (5311) (7.444M) : 0, 7443596
master (7.367M) : 0, 7366991
section Manual
This PR (5311) (8.867M) : 0, 8866868
master (8.739M) : 0, 8739132
section Manual + Automatic
This PR (5311) (6.887M) : 0, 6887133
master (6.785M) : 0, 6785188
section Version Conflict
This PR (5311) (6.191M) : 0, 6190840
master (6.306M) : 0, 6305644
|
Summary of changes
Reduce the number of threads used in unit tests by avoiding the creation of AgentWriter when possible, and properly cleaning Tracer instances otherwise.
Reason for change
Our unit tests create many instances of tracers, which in turn create agentWriters. AgentWriter uses a background thread for serialization, which stays alive unless the AgentWriter is properly cleaned up. Because of that, we were leaking many threads.
Before the changes, the unit tests used 120 threads on average with a peak at 160 (tested on my 20-cores machine).
After the changes, the unit tests use 60 threads on average with a peak at 120.
Implementation details