-
Notifications
You must be signed in to change notification settings - Fork 140
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
[Profiler] Add Callstack::CopyFrom method #5842
Conversation
Datadog ReportBranch report: ❌ 1 Failed (0 Known Flaky), 345872 Passed, 2041 Skipped, 15h 57m 53.01s Total Time ❌ Failed Tests (1)
|
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 (5842) - mean (74ms) : 65, 83
. : milestone, 74,
master - mean (73ms) : 63, 82
. : milestone, 73,
section CallTarget+Inlining+NGEN
This PR (5842) - mean (1,044ms) : 1021, 1067
. : milestone, 1044,
master - mean (1,039ms) : 1016, 1063
. : milestone, 1039,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5842) - mean (109ms) : 106, 112
. : milestone, 109,
master - mean (108ms) : 105, 112
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (5842) - mean (737ms) : 715, 760
. : milestone, 737,
master - mean (727ms) : 706, 748
. : milestone, 727,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5842) - mean (92ms) : 89, 96
. : milestone, 92,
master - mean (92ms) : 89, 95
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (5842) - mean (681ms) : 657, 705
. : milestone, 681,
master - mean (679ms) : 649, 709
. : milestone, 679,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5842) - mean (191ms) : 188, 195
. : milestone, 191,
master - mean (192ms) : 188, 195
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5842) - mean (1,142ms) : 1115, 1168
. : milestone, 1142,
master - mean (1,147ms) : 1118, 1175
. : milestone, 1147,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5842) - mean (276ms) : 272, 280
. : milestone, 276,
master - mean (276ms) : 270, 282
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (5842) - mean (910ms) : 886, 934
. : milestone, 910,
master - mean (904ms) : 882, 927
. : milestone, 904,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5842) - mean (267ms) : 262, 273
. : milestone, 267,
master - mean (266ms) : 262, 269
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (5842) - mean (884ms) : 862, 907
. : milestone, 884,
master - mean (883ms) : 859, 906
. : milestone, 883,
|
Benchmarks Report for tracer 🐌Benchmarks for #5842 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 ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.138 | 707.88 | 805.34 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.118 | 482.60 | 539.38 |
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.115 | 707.04 | 634.06 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.114 | 458.22 | 411.30 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 458ns | 0.185ns | 0.715ns | 0.00804 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 550ns | 0.22ns | 0.853ns | 0.00768 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 706ns | 0.628ns | 2.43ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 483ns | 0.594ns | 2.3ns | 0.00968 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 708ns | 0.177ns | 0.64ns | 0.00922 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 855ns | 0.561ns | 2.02ns | 0.105 | 0 | 0 | 658 B |
#5842 | StartFinishSpan |
net6.0 | 411ns | 0.463ns | 1.73ns | 0.00818 | 0 | 0 | 576 B |
#5842 | StartFinishSpan |
netcoreapp3.1 | 582ns | 0.37ns | 1.33ns | 0.00777 | 0 | 0 | 576 B |
#5842 | StartFinishSpan |
net472 | 633ns | 0.699ns | 2.71ns | 0.0917 | 0 | 0 | 578 B |
#5842 | StartFinishScope |
net6.0 | 539ns | 0.115ns | 0.415ns | 0.0097 | 0 | 0 | 696 B |
#5842 | StartFinishScope |
netcoreapp3.1 | 805ns | 0.298ns | 1.15ns | 0.00951 | 0 | 0 | 696 B |
#5842 | StartFinishScope |
net472 | 864ns | 0.259ns | 1ns | 0.105 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️
Faster 🎉 in #5842
Benchmark
base/diff
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1
1.121
962.51
858.79
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 | 1.121 | 962.51 | 858.79 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 659ns | 0.227ns | 0.878ns | 0.00964 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 962ns | 0.553ns | 2.14ns | 0.00963 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.16μs | 0.365ns | 1.32ns | 0.104 | 0 | 0 | 658 B |
#5842 | RunOnMethodBegin |
net6.0 | 631ns | 0.274ns | 1.06ns | 0.00975 | 0 | 0 | 696 B |
#5842 | RunOnMethodBegin |
netcoreapp3.1 | 859ns | 0.458ns | 1.77ns | 0.00944 | 0 | 0 | 696 B |
#5842 | RunOnMethodBegin |
net472 | 1.06μs | 0.288ns | 1.12ns | 0.104 | 0 | 0 | 658 B |
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.
LGTM
Summary of changes
Add
CopyFrom
method.Reason for change
This is a first part in an optimization for the walltime. We will need to copy callstacks.
Implementation details
CopyFrom
methodTest coverage
Other details