Skip to content
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

[IAST] Add a mark to the modified instructions in IL dumps (#5854 -> v2) #5860

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

daniel-romano-DD
Copy link
Contributor

@daniel-romano-DD daniel-romano-DD commented Aug 7, 2024

Summary of changes

Add a marker * after the IL instruction OFFSET in Dataflow IL dumps

image

Also, some not used code and useless logs have been removed

Reason for change

Sometimes modified instructions were difficult to locate in dumps present in the logs.

Implementation details

Identified new instructions with a flag instead of relaying on a negative offset as before, as this was lost in rejit situations

## Summary of changes
Add a marker * after the IL instruction OFFSET in Dataflow IL dumps


![image](https://github.com/user-attachments/assets/6cd6c007-5e48-4ce8-99a0-6b1d1d00d24e)

Also, some not used code and useless logs have been removed

## Reason for change
Sometimes modified instructions were difficult to locate in dumps
present in the logs.

## Implementation details
Identified new instructions with a flag instead of relaying on a
negative offset as before, as this was lost in `rejit` situations

## Test coverage

## Other details
<!-- Fixes #{issue} -->

<!-- ⚠️ Note: where possible, please obtain 2 approvals prior to
merging. Unless CODEOWNERS specifies otherwise, for external teams it is
typically best to have one review from a team member, and one review
from apm-dotnet. Trivial changes do not require 2 reviews. -->
@daniel-romano-DD daniel-romano-DD requested review from a team as code owners August 7, 2024 15:41
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Aug 7, 2024

Datadog Report

Branch report: dani/v2/better_il_dumps
Commit report: 948aad3
Test service: dd-trace-dotnet

✅ 0 Failed, 346915 Passed, 2246 Skipped, 23h 54m 19.62s Total Time
⌛ 15 Performance Regressions

⌛ Performance Regressions vs Default Branch (15)

This report shows up to 5 performance regressions.

  • Profiler_cpu_walltime_old_stackwalk - scenarios 3.24s (+893.05ms, +38%) - Details
  • Profiler_cpu_walltime - scenarios 3.24s (+898.81ms, +38%) - Details
  • Profiler_walltime - scenarios 3.23s (+890.61ms, +38%) - Details
  • Profiler_cpu_walltime_timer_create - scenarios 3.23s (+890.62ms, +38%) - Details
  • Profiler_liveheap - scenarios 4.21s (+1.03s, +32%) - Details

@andrewlock
Copy link
Member

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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 (5860) - mean (74ms)  : 65, 82
     .   : milestone, 74,
    master - mean (74ms)  : 64, 84
     .   : milestone, 74,

    section CallTarget+Inlining+NGEN
    This PR (5860) - mean (1,035ms)  : 1002, 1068
     .   : milestone, 1035,
    master - mean (1,063ms)  : 1041, 1084
     .   : milestone, 1063,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5860) - mean (109ms)  : 105, 114
     .   : milestone, 109,
    master - mean (110ms)  : 105, 115
     .   : milestone, 110,

    section CallTarget+Inlining+NGEN
    This PR (5860) - mean (722ms)  : 700, 744
     .   : milestone, 722,
    master - mean (747ms)  : 727, 767
     .   : milestone, 747,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5860) - mean (93ms)  : 89, 97
     .   : milestone, 93,
    master - mean (92ms)  : 88, 96
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (5860) - mean (674ms)  : 614, 734
     .   : milestone, 674,
    master - mean (703ms)  : 684, 721
     .   : milestone, 703,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5860) - mean (193ms)  : 189, 197
     .   : milestone, 193,
    master - mean (192ms)  : 189, 196
     .   : milestone, 192,

    section CallTarget+Inlining+NGEN
    This PR (5860) - mean (1,127ms)  : 1108, 1146
     .   : milestone, 1127,
    master - mean (1,169ms)  : 1139, 1200
     .   : milestone, 1169,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5860) - mean (278ms)  : 272, 284
     .   : milestone, 278,
    master - mean (275ms)  : 271, 280
     .   : milestone, 275,

    section CallTarget+Inlining+NGEN
    This PR (5860) - mean (882ms)  : 859, 906
     .   : milestone, 882,
    master - mean (921ms)  : 896, 947
     .   : milestone, 921,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5860) - mean (266ms)  : 261, 270
     .   : milestone, 266,
    master - mean (266ms)  : 262, 270
     .   : milestone, 266,

    section CallTarget+Inlining+NGEN
    This PR (5860) - mean (871ms)  : 842, 900
     .   : milestone, 871,
    master - mean (905ms)  : 883, 928
     .   : milestone, 905,

Loading

@andrewlock
Copy link
Member

Benchmarks Report for appsec 🐌

Benchmarks for #5860 compared to master:

  • All benchmarks have the same speed
  • 1 benchmarks have more allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 72.6μs 107ns 416ns 0.0723 0 0 6 KB
master AllCycleSimpleBody netcoreapp3.1 63.6μs 102ns 381ns 0.0648 0 0 6.95 KB
master AllCycleSimpleBody net472 48.2μs 45.4ns 164ns 1.32 0 0 8.33 KB
master AllCycleMoreComplexBody net6.0 77.2μs 107ns 400ns 0.116 0 0 9.51 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.6μs 121ns 470ns 0.139 0 0 10.36 KB
master AllCycleMoreComplexBody net472 56.2μs 75.6ns 293ns 1.88 0.028 0 11.85 KB
master ObjectExtractorSimpleBody net6.0 139ns 0.0911ns 0.341ns 0.00394 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 201ns 0.155ns 0.579ns 0.00376 0 0 272 B
master ObjectExtractorSimpleBody net472 163ns 0.119ns 0.445ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.14μs 1.46ns 5.67ns 0.0535 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.84μs 2.28ns 8.55ns 0.0502 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.89μs 2.2ns 8.52ns 0.602 0.0058 0 3.8 KB
#5860 AllCycleSimpleBody net6.0 73.3μs 107ns 400ns 0.0734 0 0 6.01 KB
#5860 AllCycleSimpleBody netcoreapp3.1 62.8μs 65.5ns 236ns 0.0937 0 0 6.95 KB
#5860 AllCycleSimpleBody net472 48.9μs 29.4ns 106ns 1.32 0 0 8.34 KB
#5860 AllCycleMoreComplexBody net6.0 79.6μs 100ns 387ns 0.118 0 0 9.51 KB
#5860 AllCycleMoreComplexBody netcoreapp3.1 69.4μs 96.5ns 374ns 0.104 0 0 10.36 KB
#5860 AllCycleMoreComplexBody net472 55.7μs 47.6ns 184ns 1.86 0.0278 0 11.85 KB
#5860 ObjectExtractorSimpleBody net6.0 141ns 0.149ns 0.578ns 0.00393 0 0 280 B
#5860 ObjectExtractorSimpleBody netcoreapp3.1 223ns 0.456ns 1.77ns 0.00377 0 0 272 B
#5860 ObjectExtractorSimpleBody net472 166ns 0.206ns 0.796ns 0.0446 0 0 281 B
#5860 ObjectExtractorMoreComplexBody net6.0 3.18μs 1.57ns 6.1ns 0.0525 0 0 3.78 KB
#5860 ObjectExtractorMoreComplexBody netcoreapp3.1 4.09μs 2.29ns 8.86ns 0.0511 0 0 3.69 KB
#5860 ObjectExtractorMoreComplexBody net472 3.9μs 4.13ns 15.5ns 0.602 0.00586 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 39.1μs 21.3ns 82.6ns 0.448 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54μs 16.4ns 59ns 0.431 0 0 32.4 KB
master EncodeArgs net472 65.1μs 30.2ns 113ns 5.16 0.0653 0 32.5 KB
master EncodeLegacyArgs net6.0 72.9μs 410ns 2.9μs 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 109μs 79.2ns 307ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 155μs 98.9ns 383ns 0.307 0 0 2.15 KB
#5860 EncodeArgs net6.0 38.5μs 19.6ns 75.8ns 0.444 0 0 32.4 KB
#5860 EncodeArgs netcoreapp3.1 54.4μs 27.5ns 103ns 0.433 0 0 32.4 KB
#5860 EncodeArgs net472 65.8μs 42.9ns 166ns 5.15 0.0665 0 32.5 KB
#5860 EncodeLegacyArgs net6.0 73.2μs 61.7ns 239ns 0.0362 0 0 2.14 KB
#5860 EncodeLegacyArgs netcoreapp3.1 105μs 468ns 1.81μs 0 0 0 2.15 KB
#5860 EncodeLegacyArgs net472 152μs 88.7ns 344ns 0.3 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 186μs 62.3ns 241ns 0 0 0 2.42 KB
master RunWafRealisticBenchmark netcoreapp3.1 199μs 188ns 728ns 0 0 0 2.37 KB
master RunWafRealisticBenchmark net472 209μs 55.4ns 200ns 0.311 0 0 2.43 KB
master RunWafRealisticBenchmarkWithAttack net6.0 122μs 70.5ns 273ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 131μs 210ns 815ns 0 0 0 1.45 KB
master RunWafRealisticBenchmarkWithAttack net472 140μs 26.7ns 104ns 0.209 0 0 1.48 KB
#5860 RunWafRealisticBenchmark net6.0 183μs 58.2ns 225ns 0 0 0 2.42 KB
#5860 RunWafRealisticBenchmark netcoreapp3.1 192μs 144ns 539ns 0 0 0 2.37 KB
#5860 RunWafRealisticBenchmark net472 208μs 61.6ns 238ns 0.31 0 0 2.43 KB
#5860 RunWafRealisticBenchmarkWithAttack net6.0 122μs 167ns 646ns 0 0 0 1.46 KB
#5860 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 128μs 66ns 256ns 0 0 0 1.45 KB
#5860 RunWafRealisticBenchmarkWithAttack net472 138μs 71.3ns 276ns 0.206 0 0 1.48 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ More allocations ⚠️

More allocations ⚠️ in #5860

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 59.06 KB 59.74 KB 680 B 1.15%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 58.9μs 779ns 7.67μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 61.5μs 737ns 7.25μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.5μs 98.2ns 354ns 0 0 0 59.06 KB
master StringConcatAspectBenchmark net6.0 292μs 5.72μs 56.9μs 0 0 0 254.2 KB
master StringConcatAspectBenchmark netcoreapp3.1 310μs 5.17μs 51.2μs 0 0 0 254.01 KB
master StringConcatAspectBenchmark net472 280μs 6.22μs 60.6μs 0 0 0 278.53 KB
#5860 StringConcatBenchmark net6.0 62μs 814ns 8.1μs 0 0 0 43.44 KB
#5860 StringConcatBenchmark netcoreapp3.1 54μs 262ns 1.11μs 0 0 0 42.64 KB
#5860 StringConcatBenchmark net472 37.9μs 107ns 399ns 0 0 0 59.74 KB
#5860 StringConcatAspectBenchmark net6.0 314μs 6.78μs 67.5μs 0 0 0 255.37 KB
#5860 StringConcatAspectBenchmark netcoreapp3.1 333μs 1.85μs 11.4μs 0 0 0 252.82 KB
#5860 StringConcatAspectBenchmark net472 278μs 4.97μs 48.4μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

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 (5860) (11.655M)   : 0, 11654584
    master (11.540M)   : 0, 11539873
    benchmarks/2.9.0 (11.513M)   : 0, 11512780

    section Automatic
    This PR (5860) (7.796M)   : 0, 7796361
    master (7.790M)   : 0, 7789973
    benchmarks/2.9.0 (8.207M)   : 0, 8206882

    section Trace stats
    master (8.076M)   : 0, 8075704

    section Manual
    This PR (5860) (9.831M)   : crit ,0, 9830957
    master (11.604M)   : 0, 11603917

    section Manual + Automatic
    This PR (5860) (7.340M)   : 0, 7339769
    master (7.210M)   : 0, 7209845

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5860) (9.605M)   : 0, 9605291
    benchmarks/2.9.0 (9.495M)   : 0, 9494663

    section Automatic
    This PR (5860) (6.730M)   : 0, 6730455

    section Manual
    This PR (5860) (8.379M)   : 0, 8379275

    section Manual + Automatic
    This PR (5860) (6.234M)   : 0, 6234470

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5860) (10.166M)   : 0, 10166073

    section Automatic
    This PR (5860) (7.259M)   : 0, 7259050

    section Manual
    This PR (5860) (8.929M)   : 0, 8929461

    section Manual + Automatic
    This PR (5860) (6.951M)   : 0, 6950887

Loading

@andrewlock
Copy link
Member

Benchmarks Report for tracer 🐌

Benchmarks for #5860 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.115
  • 4 benchmarks are slower, with geometric mean 1.130
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.78μs 43.5ns 292ns 0.0156 0.00779 0 5.42 KB
master StartStopWithChild netcoreapp3.1 9.9μs 55.5ns 355ns 0.0253 0.0101 0 5.61 KB
master StartStopWithChild net472 16μs 51.7ns 193ns 1 0.289 0.0803 6.07 KB
#5860 StartStopWithChild net6.0 7.72μs 43.5ns 308ns 0.0124 0.00414 0 5.43 KB
#5860 StartStopWithChild netcoreapp3.1 9.75μs 45.5ns 170ns 0.0185 0.00927 0 5.62 KB
#5860 StartStopWithChild net472 16μs 48.2ns 187ns 1.02 0.314 0.105 6.07 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 463μs 369ns 1.43μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 664μs 363ns 1.36μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 819μs 495ns 1.92μs 0.411 0 0 3.3 KB
#5860 WriteAndFlushEnrichedTraces net6.0 495μs 557ns 2.16μs 0 0 0 2.7 KB
#5860 WriteAndFlushEnrichedTraces netcoreapp3.1 648μs 353ns 1.37μs 0 0 0 2.7 KB
#5860 WriteAndFlushEnrichedTraces net472 847μs 784ns 3.04μs 0.425 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 201μs 1.17μs 10.4μs 0.189 0 0 18.45 KB
master SendRequest netcoreapp3.1 237μs 1.36μs 11.1μs 0.219 0 0 20.61 KB
master SendRequest net472 0.000272ns 0.000224ns 0.000838ns 0 0 0 0 b
#5860 SendRequest net6.0 211μs 1.55μs 15.4μs 0.191 0 0 18.45 KB
#5860 SendRequest netcoreapp3.1 227μs 1.43μs 14.3μs 0.218 0 0 20.61 KB
#5860 SendRequest net472 0.00177ns 0.000565ns 0.00219ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 557μs 2.43μs 9.43μs 0.613 0 0 41.59 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 700μs 3.64μs 18.2μs 0.386 0 0 41.77 KB
master WriteAndFlushEnrichedTraces net472 873μs 4.35μs 20.9μs 8.45 2.53 0.422 53.31 KB
#5860 WriteAndFlushEnrichedTraces net6.0 587μs 3.07μs 15.9μs 0.561 0 0 41.66 KB
#5860 WriteAndFlushEnrichedTraces netcoreapp3.1 677μs 3.12μs 12.5μs 0.351 0 0 41.67 KB
#5860 WriteAndFlushEnrichedTraces net472 865μs 3.62μs 14.9μs 8.45 2.53 0.422 53.29 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.23μs 1.41ns 5.28ns 0.0142 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.69μs 1.82ns 7.06ns 0.0134 0 0 1.02 KB
master ExecuteNonQuery net472 2.01μs 2.5ns 9.67ns 0.156 0 0 987 B
#5860 ExecuteNonQuery net6.0 1.27μs 0.929ns 3.6ns 0.014 0 0 1.02 KB
#5860 ExecuteNonQuery netcoreapp3.1 1.74μs 1.41ns 5.48ns 0.0135 0 0 1.02 KB
#5860 ExecuteNonQuery net472 1.98μs 1.65ns 6.18ns 0.157 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.13μs 0.673ns 2.61ns 0.0135 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.55μs 1.54ns 5.57ns 0.0132 0 0 976 B
master CallElasticsearch net472 2.52μs 2.79ns 10.8ns 0.158 0 0 995 B
master CallElasticsearchAsync net6.0 1.21μs 0.445ns 1.66ns 0.0132 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.66μs 1.34ns 5.2ns 0.0141 0 0 1.02 KB
master CallElasticsearchAsync net472 2.67μs 2.4ns 9.28ns 0.167 0 0 1.05 KB
#5860 CallElasticsearch net6.0 1.13μs 0.568ns 2.2ns 0.0136 0 0 976 B
#5860 CallElasticsearch netcoreapp3.1 1.51μs 0.716ns 2.77ns 0.0131 0 0 976 B
#5860 CallElasticsearch net472 2.47μs 2.43ns 9.1ns 0.157 0 0 995 B
#5860 CallElasticsearchAsync net6.0 1.34μs 0.718ns 2.69ns 0.0134 0 0 952 B
#5860 CallElasticsearchAsync netcoreapp3.1 1.55μs 0.596ns 2.31ns 0.014 0 0 1.02 KB
#5860 CallElasticsearchAsync net472 2.63μs 3.27ns 12.2ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5860

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync‑net6.0 1.119 1,210.56 1,354.13

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.21μs 0.344ns 1.29ns 0.0134 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.57μs 0.739ns 2.86ns 0.0126 0 0 952 B
master ExecuteAsync net472 1.73μs 0.724ns 2.71ns 0.145 0 0 915 B
#5860 ExecuteAsync net6.0 1.35μs 0.584ns 2.26ns 0.0136 0 0 952 B
#5860 ExecuteAsync netcoreapp3.1 1.67μs 0.761ns 2.95ns 0.0128 0 0 952 B
#5860 ExecuteAsync net472 1.76μs 1.14ns 4.4ns 0.145 0 0 915 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.15μs 1.58ns 5.9ns 0.0314 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.03μs 2.91ns 10.9ns 0.0376 0 0 2.76 KB
master SendAsync net472 7.69μs 6.3ns 23.6ns 0.497 0 0 3.15 KB
#5860 SendAsync net6.0 4.17μs 1.37ns 5.29ns 0.0314 0 0 2.22 KB
#5860 SendAsync netcoreapp3.1 5.13μs 1.78ns 6.9ns 0.0358 0 0 2.76 KB
#5860 SendAsync net472 7.73μs 4.06ns 15.7ns 0.496 0 0 3.15 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.48μs 1.87ns 6.99ns 0.0228 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.24μs 3.04ns 11.8ns 0.0223 0 0 1.64 KB
master EnrichedLog net472 2.61μs 1.34ns 5.19ns 0.249 0 0 1.57 KB
#5860 EnrichedLog net6.0 1.52μs 2.09ns 8.1ns 0.0226 0 0 1.64 KB
#5860 EnrichedLog netcoreapp3.1 2.25μs 1.43ns 5.53ns 0.0224 0 0 1.64 KB
#5860 EnrichedLog net472 2.71μs 1.84ns 7.14ns 0.249 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 114μs 192ns 743ns 0.0573 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 120μs 143ns 536ns 0.0598 0 0 4.28 KB
master EnrichedLog net472 148μs 246ns 952ns 0.661 0.22 0 4.46 KB
#5860 EnrichedLog net6.0 118μs 175ns 677ns 0.0587 0 0 4.28 KB
#5860 EnrichedLog netcoreapp3.1 120μs 175ns 654ns 0 0 0 4.28 KB
#5860 EnrichedLog net472 150μs 300ns 1.16μs 0.672 0.224 0 4.46 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 3.28μs 0.866ns 3.35ns 0.0308 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.14μs 0.966ns 3.62ns 0.029 0 0 2.2 KB
master EnrichedLog net472 4.69μs 2.01ns 7.79ns 0.32 0 0 2.02 KB
#5860 EnrichedLog net6.0 2.98μs 1.38ns 5.17ns 0.0299 0 0 2.2 KB
#5860 EnrichedLog netcoreapp3.1 4.07μs 1.61ns 6.23ns 0.0285 0 0 2.2 KB
#5860 EnrichedLog net472 4.71μs 1.02ns 3.81ns 0.319 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.23ns 4.77ns 0.0157 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.78μs 1.59ns 6.17ns 0.0152 0 0 1.14 KB
master SendReceive net472 2.12μs 0.852ns 3.07ns 0.183 0.00106 0 1.16 KB
#5860 SendReceive net6.0 1.32μs 3.11ns 11.2ns 0.0159 0 0 1.14 KB
#5860 SendReceive netcoreapp3.1 1.8μs 1.57ns 5.45ns 0.0153 0 0 1.14 KB
#5860 SendReceive net472 2.08μs 0.891ns 3.45ns 0.183 0 0 1.16 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.64μs 1.29ns 4.45ns 0.0225 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.88μs 1.39ns 5.19ns 0.0214 0 0 1.65 KB
master EnrichedLog net472 4.47μs 4.69ns 18.2ns 0.322 0 0 2.04 KB
#5860 EnrichedLog net6.0 2.7μs 1.09ns 4.07ns 0.0231 0 0 1.6 KB
#5860 EnrichedLog netcoreapp3.1 4.06μs 2.11ns 8.16ns 0.0222 0 0 1.65 KB
#5860 EnrichedLog net472 4.52μs 5.48ns 21.2ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5860

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net472 1.157 581.12 672.24
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 1.126 708.59 797.89

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 415ns 0.272ns 1.05ns 0.00797 0 0 576 B
master StartFinishSpan netcoreapp3.1 611ns 0.404ns 1.56ns 0.00764 0 0 576 B
master StartFinishSpan net472 581ns 0.697ns 2.61ns 0.0917 0 0 578 B
master StartFinishScope net6.0 479ns 0.186ns 0.722ns 0.00985 0 0 696 B
master StartFinishScope netcoreapp3.1 710ns 1.16ns 4.5ns 0.00953 0 0 696 B
master StartFinishScope net472 885ns 3.55ns 13.8ns 0.104 0 0 658 B
#5860 StartFinishSpan net6.0 398ns 0.129ns 0.501ns 0.00818 0 0 576 B
#5860 StartFinishSpan netcoreapp3.1 620ns 0.425ns 1.65ns 0.00768 0 0 576 B
#5860 StartFinishSpan net472 673ns 0.429ns 1.66ns 0.0916 0 0 578 B
#5860 StartFinishScope net6.0 474ns 0.128ns 0.461ns 0.00982 0 0 696 B
#5860 StartFinishScope netcoreapp3.1 798ns 0.889ns 3.44ns 0.00912 0 0 696 B
#5860 StartFinishScope net472 829ns 0.667ns 2.59ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5860

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 1.119 833.02 932.45

Faster 🎉 in #5860

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.115 675.40 605.76

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 676ns 0.746ns 2.89ns 0.00983 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 833ns 0.282ns 1.09ns 0.0095 0 0 696 B
master RunOnMethodBegin net472 1.14μs 0.367ns 1.27ns 0.104 0 0 658 B
#5860 RunOnMethodBegin net6.0 606ns 0.425ns 1.64ns 0.00976 0 0 696 B
#5860 RunOnMethodBegin netcoreapp3.1 935ns 1.45ns 5.6ns 0.00944 0 0 696 B
#5860 RunOnMethodBegin net472 1.14μs 0.403ns 1.56ns 0.104 0 0 658 B

@andrewlock andrewlock changed the title [IAST] Add a mark to the modified instructions in IL dumps (#5854) [IAST] Add a mark to the modified instructions in IL dumps (#5854 -> v2) Aug 8, 2024
@andrewlock andrewlock added area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) area:asm area:asm-iast labels Aug 8, 2024
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rubber stamp

@daniel-romano-DD daniel-romano-DD merged commit 30e793f into release/2.x Aug 8, 2024
66 of 69 checks passed
@daniel-romano-DD daniel-romano-DD deleted the dani/v2/better_il_dumps branch August 8, 2024 14:55
@github-actions github-actions bot added this to the vNext-v2 milestone Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:asm area:asm-iast area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants