Skip to content

[Profiler] Enable CodeHotspot feature by default when the profiler is enabled#2660

Merged
gleocadie merged 1 commit into
masterfrom
gleocadie/turn-codehotspot-on-by-default
Apr 11, 2022
Merged

[Profiler] Enable CodeHotspot feature by default when the profiler is enabled#2660
gleocadie merged 1 commit into
masterfrom
gleocadie/turn-codehotspot-on-by-default

Conversation

@gleocadie

@gleocadie gleocadie commented Apr 9, 2022

Copy link
Copy Markdown
Collaborator

Summary of changes

Reason for change

Code Hotspot feature is activated by default in the other profilers.

Implementation details

Just change the default value.

Test coverage

Other details

@gleocadie gleocadie added the area:profiler Issues related to the continous-profiler label Apr 9, 2022
@gleocadie
gleocadie force-pushed the gleocadie/turn-codehotspot-on-by-default branch from ad932d7 to 8fd44a5 Compare April 9, 2022 12:28
@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

@gleocadie
gleocadie force-pushed the gleocadie/turn-codehotspot-on-by-default branch from 8fd44a5 to c7c2105 Compare April 11, 2022 06:23
@gleocadie
gleocadie marked this pull request as ready for review April 11, 2022 06:25
@gleocadie
gleocadie requested a review from a team as a code owner April 11, 2022 06:25
@andrewlock

Copy link
Copy Markdown
Member

Code Coverage Report 📊

✔️ Merging #2660 into master will not change line coverage
✔️ Merging #2660 into master will not change branch coverage
⛔ Merging #2660 into master will will increase complexity by 61

master #2660 Change
Lines 13449 / 18473 13469 / 18553
Lines % 73% 73% 0% ✔️
Branches 7764 / 11017 7795 / 11075
Branches % 70% 70% 0% ✔️
Complexity 12313 12374 61

View the full report for further details:

Datadog.Trace Breakdown ✔️

master #2660 Change
Lines % 73% 73% 0% ✔️
Branches % 70% 70% 0% ✔️
Complexity 12313 12374 61

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Telemetry.JsonWebRequestTelemetryTransport 27% ✔️ 57% ✔️ 0 ✔️

The following classes were added in #2660:

File Line coverage Branch coverage Complexity
Datadog.Trace.TraceProcessors.ObfuscatorTraceProcessor 81% 84% 59

View the full reports for further details:

@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report 🐌

Benchmarks for #2660 compared to master:

  • 1 benchmarks are slower, with geometric mean 1.192
  • 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.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net472 925μs 4.92μs 26.5μs 0 0 0 3.17 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 700μs 3.35μs 13μs 0 0 0 2.57 KB
#2660 WriteAndFlushEnrichedTraces net472 962μs 4.26μs 21.3μs 0 0 0 3.16 KB
#2660 WriteAndFlushEnrichedTraces netcoreapp3.1 711μs 3.42μs 14.5μs 0 0 0 2.57 KB
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net472 294ns 1.38ns 5.36ns 0.0519 0 0 329 B
master AllCycleSimpleBody netcoreapp3.1 367ns 2ns 11.1ns 0.00449 0 0 328 B
master AllCycleMoreComplexBody net472 286ns 0.823ns 2.97ns 0.0482 0 0 305 B
master AllCycleMoreComplexBody netcoreapp3.1 365ns 1.43ns 5.56ns 0.00411 0 0 304 B
master BodyExtractorSimpleBody net472 417ns 1.91ns 7.14ns 0.057 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 428ns 1.97ns 7.63ns 0.00376 0 0 272 B
master BodyExtractorMoreComplexBody net472 23.7μs 118ns 526ns 1.19 0.0117 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 20.2μs 95ns 380ns 0.0896 0 0 6.75 KB
#2660 AllCycleSimpleBody net472 292ns 1.56ns 7.63ns 0.052 0 0 329 B
#2660 AllCycleSimpleBody netcoreapp3.1 369ns 1.52ns 5.89ns 0.00455 0 0 328 B
#2660 AllCycleMoreComplexBody net472 284ns 0.826ns 2.98ns 0.0482 0 0 305 B
#2660 AllCycleMoreComplexBody netcoreapp3.1 364ns 1.93ns 9.23ns 0.00411 0 0 304 B
#2660 BodyExtractorSimpleBody net472 424ns 2.19ns 9.78ns 0.057 0 0 361 B
#2660 BodyExtractorSimpleBody netcoreapp3.1 427ns 1.27ns 4.76ns 0.00365 0 0 272 B
#2660 BodyExtractorMoreComplexBody net472 23.7μs 89.9ns 336ns 1.19 0.0117 0 7.62 KB
#2660 BodyExtractorMoreComplexBody netcoreapp3.1 20.6μs 96.2ns 360ns 0.084 0 0 6.75 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 net472 0ns 0ns 0ns 0 0 0 0 b
master SendRequest netcoreapp3.1 294μs 1.45μs 7.54μs 0.148 0 0 19.74 KB
#2660 SendRequest net472 0.00079ns 0.000682ns 0.00392ns 0 0 0 0 b
#2660 SendRequest netcoreapp3.1 297μs 1.48μs 6.27μs 0.148 0 0 19.74 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 net472 1.79μs 9.77ns 54.4ns 0.0938 0 0 594 B
master ExecuteNonQuery netcoreapp3.1 1.46μs 6.34ns 23.7ns 0.00891 0 0 632 B
#2660 ExecuteNonQuery net472 1.79μs 9.99ns 65.5ns 0.0942 0.000888 0 594 B
#2660 ExecuteNonQuery netcoreapp3.1 1.5μs 5.4ns 19.5ns 0.00918 0 0 632 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 net472 2.66μs 12.3ns 46.1ns 0.127 0 0 803 B
master CallElasticsearch netcoreapp3.1 1.62μs 8.16ns 38.3ns 0.0106 0 0 792 B
master CallElasticsearchAsync net472 2.9μs 14.2ns 63.3ns 0.149 0.00144 0 939 B
master CallElasticsearchAsync netcoreapp3.1 1.78μs 5.51ns 20.6ns 0.0125 0 0 912 B
#2660 CallElasticsearch net472 2.71μs 13.4ns 60ns 0.127 0 0 803 B
#2660 CallElasticsearch netcoreapp3.1 1.63μs 5.57ns 20.1ns 0.0104 0 0 792 B
#2660 CallElasticsearchAsync net472 2.78μs 12ns 46.4ns 0.149 0.00139 0 939 B
#2660 CallElasticsearchAsync netcoreapp3.1 1.75μs 6ns 21.6ns 0.0124 0 0 912 B
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net472 3.16μs 18ns 127ns 0.165 0 0 1.06 KB
master ExecuteAsync netcoreapp3.1 1.98μs 7.63ns 28.5ns 0.0139 0 0 1.03 KB
#2660 ExecuteAsync net472 3.09μs 14.7ns 56.9ns 0.167 0.00154 0 1.06 KB
#2660 ExecuteAsync netcoreapp3.1 2.02μs 11.6ns 83.3ns 0.0141 0 0 1.03 KB
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net472 7.19μs 38ns 231ns 0.354 0 0 2.28 KB
master SendAsync netcoreapp3.1 4.88μs 28ns 222ns 0.0306 0 0 2.21 KB
#2660 SendAsync net472 6.63μs 31.6ns 134ns 0.359 0 0 2.28 KB
#2660 SendAsync netcoreapp3.1 4.74μs 25.8ns 151ns 0.031 0 0 2.21 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 net472 3.38μs 16.4ns 71.6ns 0.228 0 0 1.45 KB
master EnrichedLog netcoreapp3.1 3.04μs 11.1ns 44.3ns 0.0205 0 0 1.53 KB
#2660 EnrichedLog net472 3.42μs 19ns 119ns 0.228 0 0 1.45 KB
#2660 EnrichedLog netcoreapp3.1 3.18μs 17.8ns 125ns 0.0205 0 0 1.53 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 net472 295μs 1.39μs 5.74μs 0.442 0.147 0 4.33 KB
master EnrichedLog netcoreapp3.1 231μs 1.11μs 4.29μs 0 0 0 4.21 KB
#2660 EnrichedLog net472 292μs 1.03μs 3.86μs 0.433 0.144 0 4.33 KB
#2660 EnrichedLog netcoreapp3.1 232μs 1.15μs 5μs 0 0 0 4.21 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 net472 8.04μs 38.6ns 189ns 0.503 0 0 3.23 KB
master EnrichedLog netcoreapp3.1 6.38μs 25.1ns 118ns 0.0489 0 0 3.6 KB
#2660 EnrichedLog net472 7.89μs 40.2ns 180ns 0.504 0 0 3.23 KB
#2660 EnrichedLog netcoreapp3.1 6.33μs 15ns 54ns 0.0502 0 0 3.6 KB
Benchmarks.Trace.RedisBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #2660

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.RedisBenchmark.SendReceive‑net472 1.192 2,293.59 2,734.41 bimodal

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net472 2.3μs 8.37ns 32.4ns 0.16 0 0 1.01 KB
master SendReceive netcoreapp3.1 2.01μs 5.67ns 21.2ns 0.0141 0 0 1.01 KB
#2660 SendReceive net472 2.73μs 22.3ns 223ns 0.158 0 0 1.01 KB
#2660 SendReceive netcoreapp3.1 2.15μs 9.28ns 34.7ns 0.014 0 0 1.01 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 net472 5.88μs 22.5ns 84.1ns 0.292 0 0 1.87 KB
master EnrichedLog netcoreapp3.1 5.01μs 27.2ns 178ns 0.0195 0 0 1.49 KB
#2660 EnrichedLog net472 6.04μs 34.4ns 245ns 0.291 0 0 1.87 KB
#2660 EnrichedLog netcoreapp3.1 5.47μs 29.2ns 196ns 0.0205 0 0 1.49 KB
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net472 941ns 4.71ns 22.1ns 0.0719 0 0 457 B
master StartFinishSpan netcoreapp3.1 852ns 2.78ns 10.4ns 0.00612 0 0 456 B
master StartFinishScope net472 1.15μs 6.56ns 46.4ns 0.0842 0 0 538 B
master StartFinishScope netcoreapp3.1 1.02μs 4.92ns 20.3ns 0.00806 0 0 576 B
#2660 StartFinishSpan net472 884ns 4.1ns 15.4ns 0.0719 0 0 457 B
#2660 StartFinishSpan netcoreapp3.1 892ns 5.05ns 35ns 0.00601 0 0 456 B
#2660 StartFinishScope net472 1.12μs 5.22ns 20.2ns 0.0846 0 0 538 B
#2660 StartFinishScope netcoreapp3.1 1.03μs 4.9ns 20.2ns 0.00771 0 0 576 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 net472 1.27μs 6.47ns 30.4ns 0.0842 0 0 538 B
master RunOnMethodBegin netcoreapp3.1 1.26μs 6.4ns 29.3ns 0.00794 0 0 576 B
#2660 RunOnMethodBegin net472 1.3μs 7ns 39.6ns 0.0839 0 0 538 B
#2660 RunOnMethodBegin netcoreapp3.1 1.13μs 4.26ns 15.4ns 0.00781 0 0 576 B

@chrisnas chrisnas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gleocadie
gleocadie merged commit 9e4722b into master Apr 11, 2022
@gleocadie
gleocadie deleted the gleocadie/turn-codehotspot-on-by-default branch April 11, 2022 14:04
@github-actions github-actions Bot added this to the vNext milestone Apr 11, 2022
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.

5 participants