Skip to content

Update DDSketch parameters for DSM to match backend#3216

Merged
andrewlock merged 1 commit into
masterfrom
andrew/update-ddsketch-parameters
Sep 15, 2022
Merged

Update DDSketch parameters for DSM to match backend#3216
andrewlock merged 1 commit into
masterfrom
andrew/update-ddsketch-parameters

Conversation

@andrewlock

Copy link
Copy Markdown
Member

Summary of changes

Updates the gamma and indexOffset parameters to match those used by DSM

Reason for change

We can use any parameters, and they are normalized in the backend, but if they match, the conversion is avoided.

Implementation details

These are the values @piochelepiotr provided:

gamma is  1.015625
index offset is  1338.5

Test coverage

N/A

Other details

N/A

@andrewlock
andrewlock requested a review from a team as a code owner September 14, 2022 08:18
@github-actions github-actions Bot added the area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations) label Sep 14, 2022
@andrewlock

Copy link
Copy Markdown
Member Author

Benchmarks Report 🐌

Benchmarks for #3216 compared to master:

  • All benchmarks have the same speed
  • 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 721μs 987ns 3.82μs 0.359 0 0 3.18 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 473μs 494ns 1.91μs 0 0 0 2.58 KB
#3216 WriteAndFlushEnrichedTraces net472 711μs 735ns 2.85μs 0.359 0 0 3.18 KB
#3216 WriteAndFlushEnrichedTraces netcoreapp3.1 466μs 550ns 2.13μs 0 0 0 2.58 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 184ns 0.142ns 0.532ns 0.0675 0 0 425 B
master AllCycleSimpleBody netcoreapp3.1 235ns 0.27ns 1.05ns 0.00578 0 0 424 B
master AllCycleMoreComplexBody net472 197ns 0.144ns 0.54ns 0.0637 0 0 401 B
master AllCycleMoreComplexBody netcoreapp3.1 234ns 0.219ns 0.82ns 0.00543 0 0 400 B
master BodyExtractorSimpleBody net472 262ns 0.214ns 0.827ns 0.0574 0 0 361 B
master BodyExtractorSimpleBody netcoreapp3.1 230ns 0.239ns 0.924ns 0.00375 0 0 272 B
master BodyExtractorMoreComplexBody net472 15μs 8.01ns 31ns 1.21 0.0149 0 7.62 KB
master BodyExtractorMoreComplexBody netcoreapp3.1 12.2μs 16.2ns 62.7ns 0.0918 0 0 6.75 KB
#3216 AllCycleSimpleBody net472 182ns 0.263ns 0.947ns 0.0676 9.19E-05 0 425 B
#3216 AllCycleSimpleBody netcoreapp3.1 236ns 0.259ns 0.97ns 0.00581 0 0 424 B
#3216 AllCycleMoreComplexBody net472 180ns 0.103ns 0.4ns 0.0637 0 0 401 B
#3216 AllCycleMoreComplexBody netcoreapp3.1 233ns 0.156ns 0.583ns 0.00559 0 0 400 B
#3216 BodyExtractorSimpleBody net472 266ns 0.247ns 0.925ns 0.0574 0 0 361 B
#3216 BodyExtractorSimpleBody netcoreapp3.1 224ns 0.198ns 0.74ns 0.00369 0 0 272 B
#3216 BodyExtractorMoreComplexBody net472 14.6μs 10.8ns 41.9ns 1.21 0.0146 0 7.62 KB
#3216 BodyExtractorMoreComplexBody netcoreapp3.1 11.7μs 11.6ns 43.5ns 0.0931 0 0 6.75 KB
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 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 183μs 286ns 1.11μs 0.182 0 0 20.58 KB
#3216 SendRequest net472 0ns 0ns 0ns 0 0 0 0 b
#3216 SendRequest netcoreapp3.1 183μs 311ns 1.21μs 0.181 0 0 20.6 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.84μs 2.13ns 8.25ns 0.15 0.000917 0 947 B
master ExecuteNonQuery netcoreapp3.1 1.43μs 1.98ns 7.68ns 0.0121 0 0 936 B
#3216 ExecuteNonQuery net472 1.87μs 1.63ns 5.89ns 0.15 0 0 947 B
#3216 ExecuteNonQuery netcoreapp3.1 1.38μs 1.45ns 5.63ns 0.0124 0 0 936 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.65μs 1.7ns 6.14ns 0.183 0 0 1.16 KB
master CallElasticsearch netcoreapp3.1 1.55μs 0.826ns 3.09ns 0.0147 0 0 1.1 KB
master CallElasticsearchAsync net472 2.64μs 1.52ns 5.88ns 0.205 0 0 1.29 KB
master CallElasticsearchAsync netcoreapp3.1 1.62μs 0.799ns 3.09ns 0.0162 0 0 1.22 KB
#3216 CallElasticsearch net472 2.57μs 1.55ns 5.8ns 0.184 0 0 1.16 KB
#3216 CallElasticsearch netcoreapp3.1 1.64μs 1.63ns 6.09ns 0.0148 0 0 1.1 KB
#3216 CallElasticsearchAsync net472 2.75μs 2.11ns 8.17ns 0.205 0 0 1.29 KB
#3216 CallElasticsearchAsync netcoreapp3.1 1.63μs 0.752ns 2.71ns 0.017 0 0 1.22 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 net472 2.74μs 5.48ns 21.2ns 0.225 0.00136 0 1.42 KB
master ExecuteAsync netcoreapp3.1 1.71μs 1.66ns 6.43ns 0.0181 0 0 1.34 KB
#3216 ExecuteAsync net472 2.86μs 8.26ns 30.9ns 0.225 0 0 1.42 KB
#3216 ExecuteAsync netcoreapp3.1 1.71μs 2.9ns 11.2ns 0.018 0 0 1.34 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 5.87μs 13.7ns 52.9ns 0.438 0.00292 0 2.77 KB
master SendAsync netcoreapp3.1 3.61μs 6.26ns 24.2ns 0.0347 0 0 2.6 KB
#3216 SendAsync net472 5.77μs 21.2ns 82ns 0.44 0 0 2.77 KB
#3216 SendAsync netcoreapp3.1 3.65μs 9.48ns 35.5ns 0.034 0 0 2.6 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.15μs 3.31ns 12.8ns 0.287 0 0 1.81 KB
master EnrichedLog netcoreapp3.1 2.49μs 2.25ns 8.72ns 0.0247 0 0 1.85 KB
#3216 EnrichedLog net472 3.11μs 1.97ns 7.37ns 0.288 0 0 1.81 KB
#3216 EnrichedLog netcoreapp3.1 2.46μs 0.909ns 3.4ns 0.0246 0 0 1.85 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 151μs 235ns 911ns 0.688 0.229 0 4.65 KB
master EnrichedLog netcoreapp3.1 115μs 141ns 526ns 0.0575 0 0 4.49 KB
#3216 EnrichedLog net472 150μs 165ns 638ns 0.671 0.224 0 4.66 KB
#3216 EnrichedLog netcoreapp3.1 118μs 136ns 526ns 0.0599 0 0 4.49 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 5.55μs 15ns 56ns 0.569 0.00276 0 3.59 KB
master EnrichedLog netcoreapp3.1 4.44μs 6.23ns 23.3ns 0.0516 0 0 3.91 KB
#3216 EnrichedLog net472 5.58μs 12.8ns 49.6ns 0.568 0.00278 0 3.59 KB
#3216 EnrichedLog netcoreapp3.1 4.34μs 6.89ns 26.7ns 0.0535 0.00214 0 3.91 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 net472 2.25μs 1.68ns 6.52ns 0.218 0 0 1.37 KB
master SendReceive netcoreapp3.1 1.84μs 0.709ns 2.65ns 0.0175 0 0 1.32 KB
#3216 SendReceive net472 2.32μs 1.26ns 4.71ns 0.217 0 0 1.37 KB
#3216 SendReceive netcoreapp3.1 1.77μs 0.718ns 2.59ns 0.0178 0 0 1.32 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.14μs 4.2ns 15.7ns 0.353 0 0 2.23 KB
master EnrichedLog netcoreapp3.1 4.21μs 11.2ns 43.4ns 0.0227 0 0 1.8 KB
#3216 EnrichedLog net472 5.03μs 1.95ns 7.29ns 0.354 0 0 2.23 KB
#3216 EnrichedLog netcoreapp3.1 4.29μs 2.29ns 8.89ns 0.0236 0 0 1.8 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 1.09μs 0.641ns 2.48ns 0.128 0 0 810 B
master StartFinishSpan netcoreapp3.1 917ns 0.444ns 1.66ns 0.0101 0 0 760 B
master StartFinishScope net472 1.39μs 0.633ns 2.37ns 0.141 0 0 891 B
master StartFinishScope netcoreapp3.1 1.09μs 0.347ns 1.34ns 0.012 0 0 880 B
#3216 StartFinishSpan net472 1.17μs 0.447ns 1.73ns 0.129 0 0 810 B
#3216 StartFinishSpan netcoreapp3.1 974ns 0.443ns 1.66ns 0.0103 0 0 760 B
#3216 StartFinishScope net472 1.42μs 0.6ns 2.32ns 0.141 0 0 891 B
#3216 StartFinishScope netcoreapp3.1 1.07μs 0.684ns 2.56ns 0.0118 0 0 880 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.52μs 0.927ns 3.59ns 0.141 0 0 891 B
master RunOnMethodBegin netcoreapp3.1 1.17μs 0.533ns 2.06ns 0.0117 0 0 880 B
#3216 RunOnMethodBegin net472 1.51μs 0.542ns 2.1ns 0.141 0 0 891 B
#3216 RunOnMethodBegin netcoreapp3.1 1.19μs 0.3ns 1.08ns 0.012 0 0 880 B

@andrewlock

Copy link
Copy Markdown
Member Author

Code Coverage Report 📊

✔️ Merging #3216 into master will not change line coverage
✔️ Merging #3216 into master will not change branch coverage
✔️ Merging #3216 into master will will decrease complexity by 2

master #3216 Change
Lines 17971 / 24517 17942 / 24511
Lines % 73% 73% 0% ✔️
Branches 10585 / 15050 10584 / 15048
Branches % 70% 70% 0% ✔️
Complexity 16261 16259 -2 ✔️

View the full report for further details:

Datadog.Trace Breakdown ✔️

master #3216 Change
Lines % 73% 73% 0% ✔️
Branches % 70% 70% 0% ✔️
Complexity 16261 16259 -2 ✔️

The following classes have significant coverage changes.

File Line coverage change Branch coverage change Complexity change
Datadog.Trace.Ci.GitInfo -17% -11% 0 ✔️
Datadog.Trace.Ci.CIVisibility 5% ✔️ 6% ✔️ 0 ✔️
Datadog.Trace.Telemetry.Transports.JsonTelemetryTransport 9% ✔️ 17% ✔️ 0 ✔️
Datadog.Trace.Agent.Transports.HttpStreamRequestFactory 12% ✔️ 0% ✔️ 0 ✔️

View the full reports for further details:

@andrewlock
andrewlock merged commit 30007a9 into master Sep 15, 2022
@andrewlock
andrewlock deleted the andrew/update-ddsketch-parameters branch September 15, 2022 12:38
@github-actions github-actions Bot added this to the vNext milestone Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:data-streams-monitoring area:tracer The core tracer library (Datadog.Trace, does not include OpenTracing, native code, or integrations)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants