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

[Profiler] Allow tests for .NET Framework #5948

Open
wants to merge 62 commits into
base: master
Choose a base branch
from

Conversation

chrisnas
Copy link
Contributor

Summary of changes

Record and replay ETW events received by the Datadog agent.

Reason for change

Since ETW events sent by the .NET Framework are proxied by the Datadog agent, it is needed to mock this data exchange in integration tests.

Implementation details

  • events are recorded by the existing tooling to easily build serialized events files
  • events are replayed by a new C# tool using classes that will be used by the integration tests

Test coverage

  • manual for the tooling
  • new integration tests for .NET framework

Other details

@andrewlock
Copy link
Member

andrewlock commented Aug 27, 2024

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 (5948) - mean (70ms)  : 68, 72
     .   : milestone, 70,
    master - mean (70ms)  : 67, 73
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (5948) - mean (1,116ms)  : 1088, 1145
     .   : milestone, 1116,
    master - mean (1,111ms)  : 1087, 1134
     .   : milestone, 1111,

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

    section CallTarget+Inlining+NGEN
    This PR (5948) - mean (795ms)  : 672, 919
     .   : milestone, 795,
    master - mean (770ms)  : 756, 784
     .   : milestone, 770,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5948) - mean (92ms)  : 90, 94
     .   : milestone, 92,
    master - mean (92ms)  : 90, 94
     .   : milestone, 92,

    section CallTarget+Inlining+NGEN
    This PR (5948) - mean (725ms)  : 707, 743
     .   : milestone, 725,
    master - mean (727ms)  : 710, 744
     .   : milestone, 727,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5948) - mean (190ms)  : 186, 194
     .   : milestone, 190,
    master - mean (190ms)  : 187, 193
     .   : milestone, 190,

    section CallTarget+Inlining+NGEN
    This PR (5948) - mean (1,205ms)  : 1182, 1229
     .   : milestone, 1205,
    master - mean (1,199ms)  : 1173, 1225
     .   : milestone, 1199,

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

    section CallTarget+Inlining+NGEN
    This PR (5948) - mean (945ms)  : 922, 968
     .   : milestone, 945,
    master - mean (945ms)  : 928, 963
     .   : milestone, 945,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (5948) - mean (265ms)  : 260, 269
     .   : milestone, 265,
    master - mean (264ms)  : 259, 268
     .   : milestone, 264,

    section CallTarget+Inlining+NGEN
    This PR (5948) - mean (926ms)  : 910, 943
     .   : milestone, 926,
    master - mean (922ms)  : 899, 946
     .   : milestone, 922,

Loading

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Aug 27, 2024

Datadog Report

Branch report: chrisnas/tests_for_framework
Commit report: c6022d1
Test service: dd-trace-dotnet

❌ 5 Failed (0 Known Flaky), 164683 Passed, 1270 Skipped, 11h 39m 54.76s Total Time

❌ Failed Tests (5)

  • ShouldGetAllocationSamplesViaEtw - Datadog.Profiler.IntegrationTests.Allocations.AllocationsProfilerTest - Details

    Expand for error
     The test Samples.Computer01 is running for too long or was lost
    
  • ShouldGetAllocationSamplesViaEtw - Datadog.Profiler.IntegrationTests.Allocations.AllocationsProfilerTest - Details

    Expand for error
     The test Samples.Computer01 is running for too long or was lost
    
  • ShouldGetLockContentionSamplesViaEtw - Datadog.Profiler.IntegrationTests.Contention.ContentionProfilerTest - Details

    Expand for error
     The test Samples.Computer01 is running for too long or was lost
    
  • ShouldGetLockContentionSamplesViaEtw - Datadog.Profiler.IntegrationTests.Contention.ContentionProfilerTest - Details

    Expand for error
     The test Samples.Computer01 is running for too long or was lost
    
  • ShouldGetGarbageCollectionSamplesViaEtw - Datadog.Profiler.IntegrationTests.GarbageCollections.GarbageCollectionsProfilerTest - Details

    Expand for error
     
     Actual:   Falseilure
    

@andrewlock
Copy link
Member

andrewlock commented Aug 27, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #5948 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.125
  • 1 benchmarks are slower, with geometric mean 1.221
  • 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.85μs 43.7ns 290ns 0.0124 0.00415 0 5.43 KB
master StartStopWithChild netcoreapp3.1 10μs 56.2ns 364ns 0.0207 0.0104 0 5.61 KB
master StartStopWithChild net472 16.6μs 38.7ns 150ns 1.03 0.313 0.104 6.08 KB
#5948 StartStopWithChild net6.0 7.91μs 44.5ns 305ns 0.0155 0.00389 0 5.43 KB
#5948 StartStopWithChild netcoreapp3.1 10μs 56ns 363ns 0.00951 0.00475 0 5.62 KB
#5948 StartStopWithChild net472 16.7μs 61.9ns 240ns 1.02 0.315 0.0994 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 478μs 146ns 545ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 634μs 206ns 800ns 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 844μs 654ns 2.53μs 0.419 0 0 3.3 KB
#5948 WriteAndFlushEnrichedTraces net6.0 468μs 235ns 911ns 0 0 0 2.7 KB
#5948 WriteAndFlushEnrichedTraces netcoreapp3.1 646μs 457ns 1.77μs 0 0 0 2.7 KB
#5948 WriteAndFlushEnrichedTraces net472 843μs 503ns 1.95μs 0.419 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 190μs 1.03μs 6.24μs 0.201 0 0 18.45 KB
master SendRequest netcoreapp3.1 224μs 1.28μs 9.23μs 0.212 0 0 20.61 KB
master SendRequest net472 0.0314ns 0.00646ns 0.025ns 0 0 0 0 b
#5948 SendRequest net6.0 194μs 1.01μs 4.73μs 0.189 0 0 18.45 KB
#5948 SendRequest netcoreapp3.1 218μs 1.21μs 8.15μs 0.204 0 0 20.61 KB
#5948 SendRequest net472 5.96E‑05ns 5.96E‑05ns 0.000231ns 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 559μs 3μs 15.6μs 0.568 0 0 41.63 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 680μs 2.27μs 7.86μs 0.342 0 0 41.72 KB
master WriteAndFlushEnrichedTraces net472 843μs 2.27μs 8.17μs 8.56 2.57 0.428 53.27 KB
#5948 WriteAndFlushEnrichedTraces net6.0 574μs 2.53μs 9.47μs 0.553 0 0 41.62 KB
#5948 WriteAndFlushEnrichedTraces netcoreapp3.1 682μs 2.69μs 10.8μs 0.355 0 0 41.69 KB
#5948 WriteAndFlushEnrichedTraces net472 863μs 3.71μs 14.4μs 8.25 2.6 0.434 53.32 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.27μs 1.55ns 5.8ns 0.0145 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.76μs 2.38ns 8.9ns 0.0131 0 0 1.02 KB
master ExecuteNonQuery net472 2.1μs 1.85ns 6.93ns 0.157 0 0 987 B
#5948 ExecuteNonQuery net6.0 1.28μs 1.27ns 4.93ns 0.0141 0 0 1.02 KB
#5948 ExecuteNonQuery netcoreapp3.1 1.81μs 1.29ns 4.81ns 0.0136 0 0 1.02 KB
#5948 ExecuteNonQuery net472 2.18μs 1.74ns 6.29ns 0.156 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.09μs 1.22ns 4.72ns 0.0139 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.63μs 0.507ns 1.9ns 0.0129 0 0 976 B
master CallElasticsearch net472 2.55μs 1.26ns 4.89ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.28μs 0.419ns 1.51ns 0.0135 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.63μs 1.55ns 5.81ns 0.0138 0 0 1.02 KB
master CallElasticsearchAsync net472 2.57μs 2.41ns 9.02ns 0.166 0 0 1.05 KB
#5948 CallElasticsearch net6.0 1.17μs 0.582ns 2.26ns 0.0136 0 0 976 B
#5948 CallElasticsearch netcoreapp3.1 1.49μs 1.04ns 4.03ns 0.0134 0 0 976 B
#5948 CallElasticsearch net472 2.49μs 1.62ns 6.29ns 0.157 0 0 995 B
#5948 CallElasticsearchAsync net6.0 1.23μs 0.442ns 1.71ns 0.013 0 0 952 B
#5948 CallElasticsearchAsync netcoreapp3.1 1.72μs 0.781ns 3.03ns 0.0136 0 0 1.02 KB
#5948 CallElasticsearchAsync net472 2.51μs 1.48ns 5.74ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.29μs 1.12ns 4.32ns 0.0129 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.66μs 3.5ns 13.6ns 0.0125 0 0 952 B
master ExecuteAsync net472 1.72μs 0.571ns 2.21ns 0.145 0 0 915 B
#5948 ExecuteAsync net6.0 1.19μs 1.75ns 6.54ns 0.0131 0 0 952 B
#5948 ExecuteAsync netcoreapp3.1 1.57μs 0.997ns 3.73ns 0.0126 0 0 952 B
#5948 ExecuteAsync net472 1.73μs 0.975ns 3.65ns 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.17μs 2.47ns 9.58ns 0.0311 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.01μs 2.23ns 8.65ns 0.0375 0 0 2.76 KB
master SendAsync net472 7.78μs 4.13ns 14.3ns 0.5 0 0 3.15 KB
#5948 SendAsync net6.0 4.15μs 2.81ns 10.9ns 0.0312 0 0 2.22 KB
#5948 SendAsync netcoreapp3.1 5.07μs 2.94ns 11.4ns 0.0355 0 0 2.76 KB
#5948 SendAsync net472 7.81μs 2.69ns 10.4ns 0.5 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.44μs 0.862ns 3.23ns 0.0231 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.31μs 1.19ns 4.45ns 0.0219 0 0 1.64 KB
master EnrichedLog net472 2.69μs 0.793ns 2.86ns 0.25 0 0 1.57 KB
#5948 EnrichedLog net6.0 1.54μs 1.06ns 4.09ns 0.0235 0 0 1.64 KB
#5948 EnrichedLog netcoreapp3.1 2.14μs 1.16ns 4.35ns 0.0226 0 0 1.64 KB
#5948 EnrichedLog net472 2.51μs 1.48ns 5.72ns 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 118μs 134ns 501ns 0.0594 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 123μs 225ns 871ns 0 0 0 4.28 KB
master EnrichedLog net472 151μs 276ns 1.07μs 0.673 0.224 0 4.46 KB
#5948 EnrichedLog net6.0 118μs 222ns 799ns 0.0589 0 0 4.28 KB
#5948 EnrichedLog netcoreapp3.1 122μs 245ns 949ns 0.0604 0 0 4.28 KB
#5948 EnrichedLog net472 151μs 195ns 757ns 0.681 0.227 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 2.91μs 1.11ns 4.29ns 0.0308 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.26μs 1.56ns 6.06ns 0.0299 0 0 2.2 KB
master EnrichedLog net472 4.95μs 3.49ns 13.5ns 0.318 0 0 2.02 KB
#5948 EnrichedLog net6.0 2.97μs 0.674ns 2.52ns 0.0313 0 0 2.2 KB
#5948 EnrichedLog netcoreapp3.1 4.3μs 2.3ns 8.6ns 0.0299 0 0 2.2 KB
#5948 EnrichedLog net472 5.04μs 1.55ns 6ns 0.319 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5948

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.RedisBenchmark.SendReceive‑net6.0 1.113 1,441.49 1,295.04

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.44μs 0.536ns 2ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.75μs 1.06ns 4.11ns 0.0158 0 0 1.14 KB
master SendReceive net472 2.12μs 1.12ns 4.2ns 0.183 0.00106 0 1.16 KB
#5948 SendReceive net6.0 1.3μs 0.499ns 1.93ns 0.0163 0 0 1.14 KB
#5948 SendReceive netcoreapp3.1 1.75μs 1.68ns 6.5ns 0.0157 0 0 1.14 KB
#5948 SendReceive net472 2.08μs 0.979ns 3.79ns 0.183 0.00104 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.71μs 0.634ns 2.46ns 0.0217 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.97μs 1.38ns 5.18ns 0.0217 0 0 1.65 KB
master EnrichedLog net472 4.54μs 1.32ns 4.94ns 0.322 0 0 2.04 KB
#5948 EnrichedLog net6.0 2.76μs 1.25ns 4.66ns 0.022 0 0 1.6 KB
#5948 EnrichedLog netcoreapp3.1 3.82μs 1.94ns 7.52ns 0.0209 0 0 1.65 KB
#5948 EnrichedLog net472 4.39μs 1.89ns 7.33ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #5948

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.221 400.36 488.99

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 400ns 0.173ns 0.669ns 0.00805 0 0 576 B
master StartFinishSpan netcoreapp3.1 594ns 0.522ns 2.02ns 0.00781 0 0 576 B
master StartFinishSpan net472 720ns 0.394ns 1.53ns 0.0915 0 0 578 B
master StartFinishScope net6.0 483ns 0.242ns 0.939ns 0.0097 0 0 696 B
master StartFinishScope netcoreapp3.1 717ns 0.438ns 1.7ns 0.00935 0 0 696 B
master StartFinishScope net472 932ns 0.652ns 2.52ns 0.105 0 0 658 B
#5948 StartFinishSpan net6.0 489ns 0.199ns 0.769ns 0.0081 0 0 576 B
#5948 StartFinishSpan netcoreapp3.1 632ns 1.01ns 3.77ns 0.00792 0 0 576 B
#5948 StartFinishSpan net472 715ns 0.426ns 1.6ns 0.0915 0 0 578 B
#5948 StartFinishScope net6.0 488ns 0.386ns 1.45ns 0.00986 0 0 696 B
#5948 StartFinishScope netcoreapp3.1 673ns 0.48ns 1.86ns 0.00945 0 0 696 B
#5948 StartFinishScope net472 914ns 0.821ns 3.18ns 0.105 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #5948

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.138 734.52 645.55

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 734ns 0.274ns 1.06ns 0.00982 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 916ns 0.21ns 0.758ns 0.00921 0 0 696 B
master RunOnMethodBegin net472 1.12μs 0.475ns 1.71ns 0.104 0 0 658 B
#5948 RunOnMethodBegin net6.0 646ns 0.464ns 1.8ns 0.00971 0 0 696 B
#5948 RunOnMethodBegin netcoreapp3.1 983ns 0.521ns 1.95ns 0.00942 0 0 696 B
#5948 RunOnMethodBegin net472 1.12μs 0.711ns 2.75ns 0.104 0 0 658 B

@andrewlock
Copy link
Member

andrewlock commented Aug 27, 2024

Throughput/Crank Report ⚡

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 (5948) (11.267M)   : 0, 11266735
    master (11.099M)   : 0, 11098662
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (5948) (7.242M)   : 0, 7241705
    master (7.353M)   : 0, 7353407
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.604M)   : 0, 7604389

    section Manual
    master (10.912M)   : 0, 10911730

    section Manual + Automatic
    This PR (5948) (6.791M)   : 0, 6791407
    master (6.757M)   : 0, 6756825

    section DD_TRACE_ENABLED=0
    master (10.056M)   : 0, 10055906

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5948) (9.528M)   : 0, 9528300
    master (9.588M)   : 0, 9587958
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (5948) (6.660M)   : 0, 6660228
    master (6.554M)   : 0, 6554472

    section Trace stats
    master (6.811M)   : 0, 6811095

    section Manual
    master (9.622M)   : 0, 9622473

    section Manual + Automatic
    This PR (5948) (6.077M)   : 0, 6077150
    master (5.894M)   : 0, 5893873

    section DD_TRACE_ENABLED=0
    master (8.887M)   : 0, 8886504

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (5948) (10.286M)   : 0, 10285612
    master (10.171M)   : 0, 10171179
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (5948) (6.732M)   : 0, 6731605
    master (6.514M)   : 0, 6513949
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.311M)   : 0, 7310649

    section Manual
    master (10.008M)   : 0, 10007638

    section Manual + Automatic
    This PR (5948) (6.320M)   : 0, 6320022
    master (6.286M)   : 0, 6285745

    section DD_TRACE_ENABLED=0
    master (9.389M)   : 0, 9388827

Loading

Copy link
Collaborator

@gleocadie gleocadie left a comment

Choose a reason for hiding this comment

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

LGTM with few comments

@@ -110,6 +110,7 @@ class EtwEventsManager :

// responsible for receiving ETW events from the Windows Agent
std::unique_ptr<EtwEventsHandler> _eventsHandler;
std::string _agentEndpoint;
Copy link
Collaborator

Choose a reason for hiding this comment

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

_agentEndpoint is for the replay scenario only ?
if yes, maybe make it explicit can help understand that's not a normal case (in prod)

Comment on lines +322 to +323
std::stringstream buffer;
buffer << "OnGarbageCollectionStart: " << number << " " << generation << " " << reason << " " << type;
Copy link
Collaborator

Choose a reason for hiding this comment

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

[PERF] I expect this log to be written in Debug only, so I would expect the std::stringstream to be construction only if we are debug level no?

Comment on lines +346 to +348
std::stringstream buffer;
buffer << "OnGarbageCollectionEnd: " << number << " " << generation << " " << reason << " " << type;
LOG_GC_EVENT(buffer.str());
Copy link
Collaborator

Choose a reason for hiding this comment

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

same

@@ -93,6 +93,7 @@ Configuration::Configuration()
_isEtwEnabled = GetEnvironmentValue(EnvironmentVariables::EtwEnabled, false);
_deploymentMode = GetEnvironmentValue(EnvironmentVariables::SsiDeployed, DeploymentMode::Manual);
_isEtwLoggingEnabled = GetEnvironmentValue(EnvironmentVariables::EtwLoggingEnabled, false);
_etwEndpoint = GetEnvironmentValue(EnvironmentVariables::EtwEndpoint, DefaultEmptyString);
Copy link
Collaborator

Choose a reason for hiding this comment

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

is the _etwEndpoint only for the replay scenario ? if yes maybe make it clear :)

@@ -565,6 +566,15 @@ bool Configuration::IsEtwLoggingEnabled() const
#endif
}

std::string const& Configuration::GetEtwEndpoint() const
Copy link
Collaborator

Choose a reason for hiding this comment

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

same for the method name

@@ -63,6 +63,7 @@ class EnvironmentVariables final
inline static const shared::WSTRING EtwEnabled = WStr("DD_INTERNAL_PROFILING_ETW_ENABLED");
inline static const shared::WSTRING SsiDeployed = WStr("DD_INJECTION_ENABLED");
inline static const shared::WSTRING EtwLoggingEnabled = WStr("DD_INTERNAL_ETW_LOGGING_ENABLED");
inline static const shared::WSTRING EtwEndpoint = WStr("DD_INTERNAL_ETW_ENDPOINT");
Copy link
Collaborator

Choose a reason for hiding this comment

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

same for the environment variable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:profiler Issues related to the continous-profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants