-
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
[Dynamic Instrumentation] DEBUG-3132 Add Memoization Cache for Redaction Logic #6292
Conversation
5d8e91e
to
0052195
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 (6292) - mean (69ms) : 66, 72
. : milestone, 69,
master - mean (69ms) : 66, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6292) - mean (996ms) : 976, 1016
. : milestone, 996,
master - mean (992ms) : 960, 1024
. : milestone, 992,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6292) - mean (102ms) : 101, 104
. : milestone, 102,
master - mean (102ms) : 100, 104
. : milestone, 102,
section CallTarget+Inlining+NGEN
This PR (6292) - mean (673ms) : 654, 693
. : milestone, 673,
master - mean (674ms) : 659, 690
. : milestone, 674,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6292) - mean (89ms) : 86, 91
. : milestone, 89,
master - mean (89ms) : 87, 91
. : milestone, 89,
section CallTarget+Inlining+NGEN
This PR (6292) - mean (632ms) : 617, 647
. : milestone, 632,
master - mean (630ms) : 615, 645
. : milestone, 630,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6292) - mean (191ms) : 187, 196
. : milestone, 191,
master - mean (191ms) : 188, 195
. : milestone, 191,
section CallTarget+Inlining+NGEN
This PR (6292) - mean (1,112ms) : 1082, 1142
. : milestone, 1112,
master - mean (1,105ms) : 1077, 1133
. : milestone, 1105,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6292) - mean (272ms) : 267, 277
. : milestone, 272,
master - mean (272ms) : 266, 278
. : milestone, 272,
section CallTarget+Inlining+NGEN
This PR (6292) - mean (866ms) : 832, 900
. : milestone, 866,
master - mean (868ms) : 834, 903
. : milestone, 868,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6292) - mean (263ms) : 258, 267
. : milestone, 263,
master - mean (262ms) : 258, 266
. : milestone, 262,
section CallTarget+Inlining+NGEN
This PR (6292) - mean (848ms) : 815, 882
. : milestone, 848,
master - mean (849ms) : 811, 886
. : milestone, 849,
|
Benchmarks Report for tracer 🐌Benchmarks for #6292 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.StartFinishSpan‑netcoreapp3.1 | 1.181 | 551.10 | 651.03 | |
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 | 1.170 | 627.43 | 734.13 | several? |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 502ns | 0.492ns | 1.91ns | 0.00812 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 552ns | 1.81ns | 6.79ns | 0.00767 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 627ns | 1.15ns | 4.46ns | 0.0918 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 478ns | 0.861ns | 3.33ns | 0.00965 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 675ns | 1.14ns | 4.27ns | 0.00923 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 804ns | 2.86ns | 11.1ns | 0.104 | 0 | 0 | 658 B |
#6292 | StartFinishSpan |
net6.0 | 460ns | 0.145ns | 0.561ns | 0.00802 | 0 | 0 | 576 B |
#6292 | StartFinishSpan |
netcoreapp3.1 | 651ns | 1.06ns | 4.12ns | 0.00786 | 0 | 0 | 576 B |
#6292 | StartFinishSpan |
net472 | 728ns | 3.63ns | 15.8ns | 0.0915 | 0 | 0 | 578 B |
#6292 | StartFinishScope |
net6.0 | 523ns | 0.233ns | 0.872ns | 0.00981 | 0 | 0 | 696 B |
#6292 | StartFinishScope |
netcoreapp3.1 | 716ns | 0.361ns | 1.4ns | 0.00952 | 0 | 0 | 696 B |
#6292 | StartFinishScope |
net472 | 825ns | 3.96ns | 15.3ns | 0.104 | 0 | 0 | 658 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 | 662ns | 0.979ns | 3.79ns | 0.00971 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 921ns | 1.27ns | 4.91ns | 0.00924 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.08μs | 1.63ns | 6.32ns | 0.104 | 0 | 0 | 658 B |
#6292 | RunOnMethodBegin |
net6.0 | 677ns | 0.718ns | 2.78ns | 0.0095 | 0 | 0 | 696 B |
#6292 | RunOnMethodBegin |
netcoreapp3.1 | 936ns | 0.968ns | 3.75ns | 0.00942 | 0 | 0 | 696 B |
#6292 | RunOnMethodBegin |
net472 | 1.1μs | 0.532ns | 2.06ns | 0.104 | 0 | 0 | 658 B |
Datadog ReportBranch report: ❌ 126 Failed (0 Known Flaky), 227758 Passed, 3345 Skipped, 31h 52m 56.27s Total Time ❌ Failed Tests (126)
|
454edff
to
8c1de94
Compare
b8175dc
to
9cc9a1a
Compare
9cc9a1a
to
a8d5c98
Compare
Summary of changes
This PR introduces caching functionality to optimize redaction decisions by implementing memoization using our Adaptive Cache system.
Reason for change
Redaction decision-making can be computationally expensive.