Skip to content

Bump spdlog version#4044

Merged
gleocadie merged 5 commits into
masterfrom
gleocadie/bump-spdlog-version
Apr 18, 2023
Merged

Bump spdlog version#4044
gleocadie merged 5 commits into
masterfrom
gleocadie/bump-spdlog-version

Conversation

@gleocadie

@gleocadie gleocadie commented Apr 15, 2023

Copy link
Copy Markdown
Collaborator

Summary of changes

Update spdlog to version 1.11.0

Reason for change

Benefit from the latest improvements, bug fixes

  • prepare to compile the native part into C++20

Implementation details

Test coverage

Run locally.

Other details

@gleocadie
gleocadie requested review from a team as code owners April 15, 2023 14:26
@gleocadie
gleocadie force-pushed the gleocadie/bump-spdlog-version branch from 4abb25f to 992f359 Compare April 15, 2023 14:29
@datadog-ddstaging

datadog-ddstaging Bot commented Apr 15, 2023

Copy link
Copy Markdown

Datadog Report

Branch report: gleocadie/bump-spdlog-version
Commit report: 3ef25e5

dd-trace-dotnet: 0 Failed, 0 New Flaky, 247401 Passed, 1801 Skipped, 27m 42.3s Wall Time

@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

@gleocadie
gleocadie force-pushed the gleocadie/bump-spdlog-version branch from 355f31b to dc22194 Compare April 17, 2023 08:57
@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

@gleocadie
gleocadie force-pushed the gleocadie/bump-spdlog-version branch from dc22194 to 77ab5a2 Compare April 17, 2023 13:28
@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

@gleocadie
gleocadie force-pushed the gleocadie/bump-spdlog-version branch from 77ab5a2 to 2f8664b Compare April 18, 2023 05:27
@andrewlock

This comment has been minimized.

@andrewlock

This comment has been minimized.

@tonyredondo tonyredondo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What a nice PR, LGTM just a little nit.

Comment thread Datadog.Trace.sln

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this file shouldn't be updated in this PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thx, missed this change.
Will remove it

@tonyredondo

Copy link
Copy Markdown
Member

I got this error while trying it to build locally with the --force-arm64build-in-windows flag.

image

@gleocadie
gleocadie force-pushed the gleocadie/bump-spdlog-version branch from 2f8664b to 97521b7 Compare April 18, 2023 08:27
@gleocadie

Copy link
Copy Markdown
Collaborator Author

I got this error while trying it to build locally with the --force-arm64build-in-windows flag.

image

Fixed in 97521b7

@andrewlock

Copy link
Copy Markdown
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 (4044) - mean (3,026ms)  : 2904, 3147
     .   : milestone, 3026,
    master - mean (3,020ms)  : 2900, 3140
     .   : milestone, 3020,

    section CallTarget+Inlining+NGEN
    This PR (4044) - mean (3,677ms)  : 3582, 3772
     .   : milestone, 3677,
    master - mean (3,670ms)  : 3599, 3741
     .   : milestone, 3670,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4044) - mean (3,122ms)  : 2973, 3272
     .   : milestone, 3122,
    master - mean (3,121ms)  : 2990, 3251
     .   : milestone, 3121,

    section CallTarget+Inlining+NGEN
    This PR (4044) - mean (3,558ms)  : 3441, 3676
     .   : milestone, 3558,
    master - mean (3,543ms)  : 3464, 3621
     .   : milestone, 3543,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4044) - mean (3,103ms)  : 2982, 3223
     .   : milestone, 3103,
    master - mean (3,092ms)  : 2975, 3209
     .   : milestone, 3092,

    section CallTarget+Inlining+NGEN
    This PR (4044) - mean (3,505ms)  : 3388, 3622
     .   : milestone, 3505,
    master - mean (3,518ms)  : 3416, 3620
     .   : milestone, 3518,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4044) - mean (187ms)  : 183, 191
     .   : milestone, 187,
    master - mean (188ms)  : 182, 194
     .   : milestone, 188,

    section CallTarget+Inlining+NGEN
    This PR (4044) - mean (945ms)  : 895, 995
     .   : milestone, 945,
    master - mean (937ms)  : 915, 959
     .   : milestone, 937,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4044) - mean (367ms)  : 360, 373
     .   : milestone, 367,
    master - mean (367ms)  : 363, 371
     .   : milestone, 367,

    section CallTarget+Inlining+NGEN
    This PR (4044) - mean (1,088ms)  : 1072, 1103
     .   : milestone, 1088,
    master - mean (1,089ms)  : 1053, 1126
     .   : milestone, 1089,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (4044) - mean (356ms)  : 349, 362
     .   : milestone, 356,
    master - mean (356ms)  : 351, 362
     .   : milestone, 356,

    section CallTarget+Inlining+NGEN
    This PR (4044) - mean (1,033ms)  : 1011, 1054
     .   : milestone, 1033,
    master - mean (1,031ms)  : 1003, 1058
     .   : milestone, 1031,

Loading

@andrewlock

Copy link
Copy Markdown
Member

Benchmarks Report 🐌

Benchmarks for #4044 compared to master:

  • 1 benchmarks are faster, with geometric mean 1.121
  • 1 benchmarks have fewer 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 netcoreapp3.1 585μs 202ns 783ns 0 0 0 2.63 KB
master WriteAndFlushEnrichedTraces net472 810μs 230ns 889ns 0.403 0 0 3.22 KB
#4044 WriteAndFlushEnrichedTraces netcoreapp3.1 609μs 196ns 705ns 0 0 0 2.63 KB
#4044 WriteAndFlushEnrichedTraces net472 799μs 200ns 774ns 0.398 0 0 3.22 KB
Benchmarks.Trace.AppSecBodyBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #4044

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.AppSecBodyBenchmark.AllCycleSimpleBody‑net472 1.121 104,422.22 93,111.02

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody netcoreapp3.1 92.8μs 174ns 603ns 0 0 0 1.66 KB
master AllCycleSimpleBody net472 104μs 148ns 575ns 0.236 0 0 1.71 KB
master AllCycleMoreComplexBody netcoreapp3.1 274μs 411ns 1.59μs 0 0 0 9.15 KB
master AllCycleMoreComplexBody net472 264μs 321ns 1.24μs 1.46 0 0 9.31 KB
master ObjectExtractorSimpleBody netcoreapp3.1 181ns 0.196ns 0.757ns 0.00375 0 0 272 B
master ObjectExtractorSimpleBody net472 142ns 0.229ns 0.887ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody netcoreapp3.1 4.03μs 3.47ns 13ns 0.0525 0 0 3.78 KB
master ObjectExtractorMoreComplexBody net472 3.99μs 6.12ns 23.7ns 0.617 0.00603 0 3.89 KB
#4044 AllCycleSimpleBody netcoreapp3.1 98μs 437ns 1.8μs 0 0 0 1.66 KB
#4044 AllCycleSimpleBody net472 93.1μs 107ns 415ns 0.232 0 0 1.71 KB
#4044 AllCycleMoreComplexBody netcoreapp3.1 268μs 966ns 4.43μs 0 0 0 9.14 KB
#4044 AllCycleMoreComplexBody net472 269μs 413ns 1.6μs 1.45 0 0 9.31 KB
#4044 ObjectExtractorSimpleBody netcoreapp3.1 176ns 0.276ns 1.07ns 0.00373 0 0 272 B
#4044 ObjectExtractorSimpleBody net472 144ns 0.211ns 0.819ns 0.0446 0 0 281 B
#4044 ObjectExtractorMoreComplexBody netcoreapp3.1 4.14μs 0.937ns 3.38ns 0.0514 0 0 3.78 KB
#4044 ObjectExtractorMoreComplexBody net472 4.03μs 5.16ns 19.3ns 0.617 0.00601 0 3.89 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 netcoreapp3.1 185μs 310ns 1.2μs 0.184 0 0 20.36 KB
master SendRequest net472 0.000974ns 0.000421ns 0.00163ns 0 0 0 0 b
#4044 SendRequest netcoreapp3.1 185μs 346ns 1.29μs 0.271 0 0 20.36 KB
#4044 SendRequest net472 0.000263ns 0.000137ns 0.000514ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #4044

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑netcoreapp3.1 42.09 KB 41.73 KB -362 B -0.86%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces netcoreapp3.1 625μs 1.28μs 4.94μs 0.311 0 0 42.09 KB
master WriteAndFlushEnrichedTraces net472 808μs 2.62μs 10.1μs 8.22 2.47 0.411 53.25 KB
#4044 WriteAndFlushEnrichedTraces netcoreapp3.1 606μs 739ns 2.77μs 0.311 0 0 41.73 KB
#4044 WriteAndFlushEnrichedTraces net472 784μs 2.51μs 9.73μs 8.38 2.67 0.381 53.22 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 netcoreapp3.1 1.35μs 0.654ns 2.36ns 0.0122 0 0 904 B
master ExecuteNonQuery net472 1.68μs 2.14ns 8.27ns 0.144 0.00084 0 907 B
#4044 ExecuteNonQuery netcoreapp3.1 1.32μs 1.14ns 4.42ns 0.0118 0 0 904 B
#4044 ExecuteNonQuery net472 1.63μs 2.08ns 8.07ns 0.144 0 0 907 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 netcoreapp3.1 1.3μs 0.343ns 1.28ns 0.0145 0 0 1.06 KB
master CallElasticsearch net472 2.24μs 0.853ns 3.3ns 0.175 0.00112 0 1.11 KB
master CallElasticsearchAsync netcoreapp3.1 1.38μs 0.793ns 3.07ns 0.0159 0 0 1.18 KB
master CallElasticsearchAsync net472 2.21μs 1.3ns 4.85ns 0.197 0.0011 0 1.24 KB
#4044 CallElasticsearch netcoreapp3.1 1.36μs 0.437ns 1.64ns 0.0146 0 0 1.06 KB
#4044 CallElasticsearch net472 2.14μs 0.912ns 3.41ns 0.175 0.00107 0 1.11 KB
#4044 CallElasticsearchAsync netcoreapp3.1 1.39μs 0.348ns 1.3ns 0.016 0 0 1.18 KB
#4044 CallElasticsearchAsync net472 2.31μs 0.571ns 2.21ns 0.197 0.00116 0 1.24 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 netcoreapp3.1 1.47μs 0.496ns 1.79ns 0.0171 0 0 1.28 KB
master ExecuteAsync net472 1.91μs 0.552ns 2.14ns 0.207 0 0 1.3 KB
#4044 ExecuteAsync netcoreapp3.1 1.42μs 0.49ns 1.77ns 0.0177 0 0 1.28 KB
#4044 ExecuteAsync net472 1.79μs 0.811ns 3.04ns 0.206 0.000902 0 1.3 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 netcoreapp3.1 4.27μs 1.3ns 4.87ns 0.0363 0 0 2.66 KB
master SendAsync net472 6.82μs 1.52ns 5.88ns 0.478 0 0 3.03 KB
#4044 SendAsync netcoreapp3.1 4.27μs 3.64ns 14.1ns 0.0361 0 0 2.66 KB
#4044 SendAsync net472 6.78μs 1.65ns 6.18ns 0.478 0 0 3.03 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 netcoreapp3.1 1.98μs 2.71ns 10.5ns 0.0248 0 0 1.83 KB
master EnrichedLog net472 2.44μs 1.78ns 6.65ns 0.284 0 0 1.79 KB
#4044 EnrichedLog netcoreapp3.1 1.96μs 1.01ns 3.8ns 0.0252 0 0 1.83 KB
#4044 EnrichedLog net472 2.52μs 1.72ns 6.66ns 0.283 0 0 1.79 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 netcoreapp3.1 119μs 120ns 466ns 0.0598 0 0 4.42 KB
master EnrichedLog net472 149μs 77.6ns 290ns 0.669 0.223 0 4.63 KB
#4044 EnrichedLog netcoreapp3.1 120μs 89.1ns 345ns 0.0593 0 0 4.42 KB
#4044 EnrichedLog net472 149μs 82.1ns 318ns 0.669 0.223 0 4.63 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 netcoreapp3.1 3.93μs 1.17ns 4.37ns 0.0528 0 0 3.9 KB
master EnrichedLog net472 5.07μs 1.93ns 7.47ns 0.565 0.00252 0 3.56 KB
#4044 EnrichedLog netcoreapp3.1 3.78μs 1.2ns 4.32ns 0.0532 0 0 3.9 KB
#4044 EnrichedLog net472 5.18μs 1.05ns 4.06ns 0.565 0.00258 0 3.56 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 netcoreapp3.1 1.56μs 0.55ns 2.06ns 0.018 0 0 1.3 KB
master SendReceive net472 1.86μs 2.42ns 9.38ns 0.213 0.000934 0 1.34 KB
#4044 SendReceive netcoreapp3.1 1.49μs 0.565ns 2.04ns 0.0178 0 0 1.3 KB
#4044 SendReceive net472 1.98μs 2.76ns 9.94ns 0.212 0 0 1.34 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 netcoreapp3.1 3.67μs 0.919ns 3.44ns 0.0239 0 0 1.78 KB
master EnrichedLog net472 4.28μs 1.3ns 5.04ns 0.351 0 0 2.21 KB
#4044 EnrichedLog netcoreapp3.1 3.8μs 2.42ns 9.37ns 0.0227 0 0 1.78 KB
#4044 EnrichedLog net472 4.45μs 1.94ns 7.25ns 0.349 0 0 2.21 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 netcoreapp3.1 718ns 0.403ns 1.45ns 0.01 0 0 720 B
master StartFinishSpan net472 838ns 0.567ns 2.19ns 0.121 0 0 762 B
master StartFinishScope netcoreapp3.1 874ns 0.336ns 1.26ns 0.0113 0 0 840 B
master StartFinishScope net472 1.05μs 0.351ns 1.36ns 0.134 0 0 842 B
#4044 StartFinishSpan netcoreapp3.1 732ns 0.331ns 1.24ns 0.00949 0 0 720 B
#4044 StartFinishSpan net472 866ns 0.713ns 2.57ns 0.121 0 0 762 B
#4044 StartFinishScope netcoreapp3.1 885ns 0.443ns 1.71ns 0.0112 0 0 840 B
#4044 StartFinishScope net472 1.13μs 0.379ns 1.42ns 0.134 0 0 842 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 netcoreapp3.1 931ns 0.395ns 1.37ns 0.0116 0 0 840 B
master RunOnMethodBegin net472 1.24μs 0.367ns 1.37ns 0.133 0 0 842 B
#4044 RunOnMethodBegin netcoreapp3.1 904ns 0.309ns 1.16ns 0.0113 0 0 840 B
#4044 RunOnMethodBegin net472 1.24μs 1.15ns 4.46ns 0.133 0 0 842 B

@gleocadie
gleocadie merged commit 51a742e into master Apr 18, 2023
@gleocadie
gleocadie deleted the gleocadie/bump-spdlog-version branch April 18, 2023 11:44
@github-actions github-actions Bot added this to the vNext milestone Apr 18, 2023
@andrewlock andrewlock added area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) area:shared-components labels May 5, 2023
andrewlock added a commit that referenced this pull request Apr 28, 2026
## Summary of changes

- Update the `UpdateVendors` tool to allow outputting to arbitrary
directory
- Allow opting-out of "NuGet dependabot honeypot file"
- Add spdlog to the list of vendored deps

## Reason for change

We want to update spdlog. The update was done manually in
#4044, but using the
existing infrastructure seems preferable.

Note that this PR _doesn't_ bump the dependency, it just sets up the
infrastructure to make it easy.

## Implementation details

- Add `RelativePathToVendorDirectoryOverride` to allow vendoring to
arbitrary directory
- Add `IsNuGetPackage` to allow opt-out of the NuGet dependabot file
- Add reference for vendored spdlog code

## Test coverage

Ran the tool, and it updated spdlog, but the code was the same

## Other details

We'll bump the spdlog version in a subsequent PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:native-library Automatic instrumentation native C++ code (Datadog.Trace.ClrProfiler.Native) area:shared-components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants