-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Shared] Fix bug in logger #6335
Conversation
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 (6335) - mean (72ms) : 64, 79
. : milestone, 72,
master - mean (71ms) : 64, 78
. : milestone, 71,
section CallTarget+Inlining+NGEN
This PR (6335) - mean (1,110ms) : 1091, 1129
. : milestone, 1110,
master - mean (1,109ms) : 1083, 1135
. : milestone, 1109,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6335) - mean (108ms) : 106, 110
. : milestone, 108,
master - mean (109ms) : 106, 112
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6335) - mean (770ms) : 754, 786
. : milestone, 770,
master - mean (772ms) : 752, 791
. : milestone, 772,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6335) - mean (92ms) : 90, 95
. : milestone, 92,
master - mean (92ms) : 91, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6335) - mean (724ms) : 706, 743
. : milestone, 724,
master - mean (726ms) : 711, 741
. : milestone, 726,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6335) - mean (191ms) : 185, 197
. : milestone, 191,
master - mean (192ms) : 186, 198
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (6335) - mean (1,215ms) : 1196, 1235
. : milestone, 1215,
master - mean (1,214ms) : 1192, 1237
. : milestone, 1214,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6335) - mean (277ms) : 271, 282
. : milestone, 277,
master - mean (278ms) : 272, 284
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (6335) - mean (946ms) : 928, 964
. : milestone, 946,
master - mean (949ms) : 933, 965
. : milestone, 949,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6335) - mean (266ms) : 263, 269
. : milestone, 266,
master - mean (266ms) : 262, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (6335) - mean (934ms) : 918, 951
. : milestone, 934,
master - mean (931ms) : 914, 948
. : milestone, 931,
|
Datadog ReportBranch report: ❌ 1 Failed (1 Known Flaky), 449178 Passed, 3185 Skipped, 22h 7m 17.62s Total Time ❌ Failed Tests (1)
New Flaky Tests (1)
⌛ Performance Regressions vs Default Branch (1)
|
Benchmarks Report for tracer 🐌Benchmarks for #6335 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.125 | 640.08 | 720.00 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 388ns | 0.528ns | 2.04ns | 0.00809 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 615ns | 1.12ns | 4.34ns | 0.00767 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 643ns | 1.25ns | 4.82ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 477ns | 0.672ns | 2.6ns | 0.0099 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 639ns | 1.12ns | 4.18ns | 0.00921 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 847ns | 1.27ns | 4.91ns | 0.105 | 0 | 0 | 658 B |
#6335 | StartFinishSpan |
net6.0 | 398ns | 0.268ns | 1ns | 0.008 | 0 | 0 | 576 B |
#6335 | StartFinishSpan |
netcoreapp3.1 | 595ns | 1.2ns | 4.64ns | 0.00756 | 0 | 0 | 576 B |
#6335 | StartFinishSpan |
net472 | 654ns | 1.15ns | 4.44ns | 0.0918 | 0 | 0 | 578 B |
#6335 | StartFinishScope |
net6.0 | 496ns | 0.68ns | 2.55ns | 0.00977 | 0 | 0 | 696 B |
#6335 | StartFinishScope |
netcoreapp3.1 | 721ns | 1.37ns | 5.31ns | 0.00918 | 0 | 0 | 696 B |
#6335 | StartFinishScope |
net472 | 905ns | 1.19ns | 4.62ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6335
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0
1.199
594.38
712.43
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.199 | 594.38 | 712.43 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 594ns | 0.832ns | 3.22ns | 0.00963 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 857ns | 1.45ns | 5.61ns | 0.00952 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.09μs | 1.86ns | 7.22ns | 0.104 | 0 | 0 | 658 B |
#6335 | RunOnMethodBegin |
net6.0 | 713ns | 1.05ns | 4.08ns | 0.00965 | 0 | 0 | 696 B |
#6335 | RunOnMethodBegin |
netcoreapp3.1 | 936ns | 1.94ns | 7.51ns | 0.00947 | 0 | 0 | 696 B |
#6335 | RunOnMethodBegin |
net472 | 1.12μs | 1.8ns | 6.98ns | 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
Fix a bug in the logger for
WCHAR[n]
string.Reason for change
When get a string from the Windows API (for ex:) like
The logger will write all the 250 characters even if the string is smaller.
Example
My Log Line^@Garbage^@^@^@^@^@
Instead of
My Log Line
Implementation details
shared::ToString
insteadTest coverage
Other details