Closed andrewlock closed 2 months ago
Branch report: kevin/string_conversion-v2
Commit report: 24cf403
Test service: dd-trace-dotnet
:x: 1 Failed (1 Known Flaky), 347368 Passed, 2080 Skipped, 15h 37m 20.14s Total Time
CheckErrorWhenNoAgentIsAvailable
- Datadog.Profiler.IntegrationTests.WindowsOnly.EtwEventsTests
- :snowflake: Known flaky - Details
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 (5940) - mean (75ms) : 65, 84
. : milestone, 75,
section CallTarget+Inlining+NGEN
This PR (5940) - mean (1,028ms) : 1007, 1049
. : milestone, 1028,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5940) - mean (110ms) : 106, 113
. : milestone, 110,
section CallTarget+Inlining+NGEN
This PR (5940) - mean (710ms) : 690, 729
. : milestone, 710,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5940) - mean (93ms) : 91, 95
. : milestone, 93,
section CallTarget+Inlining+NGEN
This PR (5940) - mean (667ms) : 645, 689
. : milestone, 667,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5940) - mean (190ms) : 187, 193
. : milestone, 190,
section CallTarget+Inlining+NGEN
This PR (5940) - mean (1,115ms) : 1095, 1135
. : milestone, 1115,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5940) - mean (279ms) : 270, 287
. : milestone, 279,
section CallTarget+Inlining+NGEN
This PR (5940) - mean (880ms) : 858, 901
. : milestone, 880,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5940) - mean (264ms) : 260, 268
. : milestone, 264,
section CallTarget+Inlining+NGEN
This PR (5940) - mean (866ms) : 840, 892
. : milestone, 866,
Benchmarks for #5940 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored.
Summary of changes
Fix ToString and ToWString on large strings
Reason for change
Those two methods have a fast-path, where we try to fit the result in a pre-allocated buffer. But when the string is too long, we incorrectly assumed that
WideCharToMultiByte
/MultiByteToWideChar
would return the needed size. In truth, it only does so whencchWideChar
is 0. Because of that mistake, we were returning an empty string.Implementation details
Added a few minor changes while I was at it:
&array[0]
str.data()
instead of&str[0]
Test coverage
Added a unit test for long strings.
Other details
Backport of https://github.com/DataDog/dd-trace-dotnet/pull/5930