Skip to content

Conversation

@danielsn
Copy link
Contributor

@danielsn danielsn commented Dec 4, 2025

What does this PR do?

Uses reqwest to send profiles instead of hyper.

Motivation

The hyper code has to handle a lot of lower level issues and is therefore more complex.

Additional Notes

Most of the crazy LOC change is in licence third party

  • Total actual code: ~3,000 lines
  • License file changes: ~9,000 insertions (but net +2,900)

How to test the change?

Describe here in detail how the change can be validated.

@danielsn danielsn force-pushed the dsn/r-and-d-exporter branch 2 times, most recently from 9837dcd to a529caa Compare December 5, 2025 03:11
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 88.78505% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.11%. Comparing base (6b26318) to head (0e5a4d8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1383      +/-   ##
==========================================
+ Coverage   70.96%   71.11%   +0.14%     
==========================================
  Files         400      401       +1     
  Lines       63691    63875     +184     
==========================================
+ Hits        45199    45425     +226     
+ Misses      18492    18450      -42     
Components Coverage Δ
libdd-crashtracker 58.42% <ø> (-0.28%) ⬇️
libdd-crashtracker-ffi 14.72% <ø> (-2.02%) ⬇️
libdd-alloc 98.73% <ø> (ø)
libdd-data-pipeline 86.57% <ø> (+0.75%) ⬆️
libdd-data-pipeline-ffi 79.20% <ø> (+2.61%) ⬆️
libdd-common 81.20% <ø> (+0.05%) ⬆️
libdd-common-ffi 74.96% <ø> (ø)
libdd-telemetry 59.98% <ø> (ø)
libdd-telemetry-ffi 21.24% <ø> (ø)
libdd-dogstatsd-client 83.75% <ø> (ø)
datadog-ipc 82.71% <ø> (+0.10%) ⬆️
libdd-profiling 80.25% <88.78%> (+0.61%) ⬆️
libdd-profiling-ffi 62.13% <ø> (ø)
datadog-sidecar 35.86% <ø> (-0.02%) ⬇️
datdog-sidecar-ffi 10.74% <ø> (-0.09%) ⬇️
spawn-worker 55.18% <ø> (ø)
libdd-tinybytes 92.44% <ø> (ø)
libdd-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
libdd-trace-protobuf 59.65% <ø> (ø)
libdd-trace-utils 90.03% <ø> (+0.14%) ⬆️
datadog-tracer-flare 62.06% <ø> (-1.43%) ⬇️
libdd-log 75.57% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pr-commenter
Copy link

pr-commenter bot commented Dec 5, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-12-11 06:34:12

Comparing candidate commit 977d607 in PR branch dsn/r-and-d-exporter with baseline commit 2f641ea in branch main.

Found 14 performance improvements and 1 performance regressions! Performance is the same for 42 metrics, 2 unstable metrics.

scenario:credit_card/is_card_number/ 3782-8224-6310-005

  • 🟩 execution_time [-4.501µs; -4.244µs] or [-5.518%; -5.202%]
  • 🟩 throughput [+673316.600op/s; +712239.711op/s] or [+5.492%; +5.810%]

scenario:credit_card/is_card_number/ 378282246310005

  • 🟩 execution_time [-4.298µs; -4.239µs] or [-5.730%; -5.651%]
  • 🟩 throughput [+798924.791op/s; +809762.191op/s] or [+5.993%; +6.074%]

scenario:credit_card/is_card_number/378282246310005

  • 🟩 execution_time [-4.592µs; -4.514µs] or [-6.365%; -6.256%]
  • 🟩 throughput [+925641.351op/s; +941243.770op/s] or [+6.679%; +6.791%]

scenario:credit_card/is_card_number/37828224631000521389798

  • 🟩 execution_time [-6.952µs; -6.914µs] or [-13.317%; -13.244%]
  • 🟩 throughput [+2924550.811op/s; +2943007.060op/s] or [+15.267%; +15.363%]

scenario:credit_card/is_card_number_no_luhn/ 378282246310005

  • 🟩 execution_time [-4.590µs; -4.551µs] or [-7.970%; -7.902%]
  • 🟩 throughput [+1490814.159op/s; +1502679.270op/s] or [+8.585%; +8.654%]

scenario:credit_card/is_card_number_no_luhn/378282246310005

  • 🟩 execution_time [-5.109µs; -5.044µs] or [-9.306%; -9.188%]
  • 🟩 throughput [+1844748.824op/s; +1866375.689op/s] or [+10.128%; +10.246%]

scenario:credit_card/is_card_number_no_luhn/37828224631000521389798

  • 🟩 execution_time [-6.965µs; -6.925µs] or [-13.341%; -13.265%]
  • 🟩 throughput [+2929673.019op/s; +2948912.896op/s] or [+15.295%; +15.396%]

scenario:sql/obfuscate_sql_string

  • 🟥 execution_time [+5.050µs; +5.116µs] or [+5.988%; +6.065%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 531.392µs 532.288µs ± 0.502µs 532.211µs ± 0.215µs 532.462µs 532.984µs 533.258µs 537.372µs 0.97% 5.364 50.742 0.09% 0.036µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [532.219µs; 532.358µs] or [-0.013%; +0.013%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.894µs 3.912µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.917µs 3.919µs 3.919µs 0.16% -0.968 4.819 0.08% 0.000µs 1 200
credit_card/is_card_number/ throughput 255181089.255op/s 255591486.269op/s ± 206817.077op/s 255579660.384op/s ± 159868.664op/s 255744410.017op/s 255857414.998op/s 255964660.804op/s 256831806.404op/s 0.49% 0.982 4.916 0.08% 14624.176op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 77.049µs 77.207µs ± 0.168µs 77.141µs ± 0.046µs 77.232µs 77.570µs 77.755µs 78.103µs 1.25% 2.118 5.142 0.22% 0.012µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12803681.157op/s 12952303.042op/s ± 28014.110op/s 12963231.091op/s ± 7773.380op/s 12968820.686op/s 12976475.467op/s 12978172.699op/s 12978761.555op/s 0.12% -2.101 5.026 0.22% 1980.897op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 70.622µs 70.740µs ± 0.095µs 70.716µs ± 0.043µs 70.764µs 70.943µs 71.017µs 71.324µs 0.86% 2.203 7.411 0.13% 0.007µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 14020448.528op/s 14136200.896op/s ± 18990.598op/s 14141042.459op/s ± 8663.068op/s 14148412.412op/s 14154464.663op/s 14159458.384op/s 14159892.106op/s 0.13% -2.185 7.270 0.13% 1342.838op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.891µs 3.913µs ± 0.007µs 3.913µs ± 0.002µs 3.915µs 3.918µs 3.921µs 3.977µs 1.65% 6.670 57.861 0.18% 0.001µs 1 200
credit_card/is_card_number/37828224631 throughput 251426273.573op/s 255553738.101op/s ± 461063.490op/s 255584051.555op/s ± 138851.192op/s 255732111.236op/s 255907796.944op/s 255959588.417op/s 257009310.554op/s 0.56% -6.586 57.002 0.18% 32602.112op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 67.394µs 67.598µs ± 0.138µs 67.552µs ± 0.061µs 67.663µs 67.884µs 68.064µs 68.067µs 0.76% 1.349 1.651 0.20% 0.010µs 1 200
credit_card/is_card_number/378282246310005 throughput 14691495.360op/s 14793442.796op/s ± 30083.051op/s 14803390.116op/s ± 13465.838op/s 14813777.888op/s 14825896.463op/s 14837135.871op/s 14838026.017op/s 0.23% -1.338 1.612 0.20% 2127.193op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 44.960µs 45.271µs ± 0.133µs 45.287µs ± 0.093µs 45.367µs 45.477µs 45.510µs 45.555µs 0.59% -0.288 -0.507 0.29% 0.009µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21951428.608op/s 22089616.216op/s ± 64942.736op/s 22081496.380op/s ± 45508.033op/s 22132656.987op/s 22209985.393op/s 22240128.243op/s 22242017.395op/s 0.73% 0.300 -0.500 0.29% 4592.145op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.028µs 6.051µs ± 0.045µs 6.037µs ± 0.003µs 6.040µs 6.115µs 6.253µs 6.269µs 3.85% 3.309 10.934 0.74% 0.003µs 1 200
credit_card/is_card_number/x371413321323331 throughput 159520043.346op/s 165260452.209op/s ± 1198346.471op/s 165655399.244op/s ± 88619.042op/s 165741925.593op/s 165844975.340op/s 165880726.660op/s 165893599.817op/s 0.14% -3.265 10.620 0.72% 84735.892op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.913µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.917µs 3.919µs 3.922µs 0.21% -1.288 6.989 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254995762.042op/s 255555950.094op/s ± 192407.267op/s 255533561.293op/s ± 113823.768op/s 255666786.562op/s 255857762.624op/s 255921016.164op/s 256778330.079op/s 0.49% 1.305 7.101 0.08% 13605.248op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.783µs 65.654µs ± 0.120µs 65.659µs ± 0.061µs 65.723µs 65.814µs 65.871µs 65.881µs 0.34% -2.453 15.253 0.18% 0.008µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15178856.032op/s 15231303.170op/s ± 28009.766op/s 15230181.801op/s ± 14103.581op/s 15243742.208op/s 15269833.985op/s 15276343.188op/s 15436174.847op/s 1.35% 2.515 15.780 0.18% 1980.590op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 52.942µs 53.019µs ± 0.040µs 53.014µs ± 0.030µs 53.047µs 53.092µs 53.109µs 53.122µs 0.20% 0.436 -0.554 0.08% 0.003µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18824433.078op/s 18861200.587op/s ± 14265.440op/s 18862976.693op/s ± 10767.555op/s 18872998.873op/s 18880688.172op/s 18885631.227op/s 18888746.085op/s 0.14% -0.433 -0.557 0.08% 1008.719op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.897µs 3.913µs ± 0.003µs 3.912µs ± 0.002µs 3.915µs 3.917µs 3.919µs 3.926µs 0.34% -0.214 4.112 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254737322.186op/s 255585041.298op/s ± 198196.111op/s 255592753.284op/s ± 131740.462op/s 255715170.303op/s 255848922.022op/s 255924973.671op/s 256635745.254op/s 0.41% 0.228 4.147 0.08% 14014.581op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 49.739µs 49.825µs ± 0.045µs 49.819µs ± 0.029µs 49.852µs 49.910µs 49.958µs 49.972µs 0.31% 0.680 0.276 0.09% 0.003µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 20011355.698op/s 20070410.076op/s ± 18307.329op/s 20072586.868op/s ± 11728.424op/s 20084246.921op/s 20095895.315op/s 20101663.815op/s 20105094.631op/s 0.16% -0.675 0.266 0.09% 1294.524op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 44.851µs 45.263µs ± 0.139µs 45.280µs ± 0.095µs 45.374µs 45.442µs 45.494µs 45.531µs 0.55% -0.641 -0.058 0.31% 0.010µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21963045.099op/s 22093459.766op/s ± 67899.038op/s 22084797.969op/s ± 46375.480op/s 22132156.640op/s 22219747.690op/s 22272081.153op/s 22296051.389op/s 0.96% 0.656 -0.033 0.31% 4801.187op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.027µs 6.046µs ± 0.041µs 6.034µs ± 0.003µs 6.037µs 6.110µs 6.180µs 6.390µs 5.90% 4.569 26.811 0.68% 0.003µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 156495676.937op/s 165402612.043op/s ± 1098280.551op/s 165734638.821op/s ± 69791.093op/s 165790734.779op/s 165880238.147op/s 165905208.724op/s 165928360.656op/s 0.12% -4.416 24.764 0.66% 77660.163op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ throughput [255562823.412op/s; 255620149.127op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [77.183µs; 77.230µs] or [-0.030%; +0.030%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12948420.555op/s; 12956185.528op/s] or [-0.030%; +0.030%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [70.727µs; 70.754µs] or [-0.019%; +0.019%] None None None
credit_card/is_card_number/ 378282246310005 throughput [14133568.981op/s; 14138832.810op/s] or [-0.019%; +0.019%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.914µs] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/37828224631 throughput [255489839.136op/s; 255617637.066op/s] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/378282246310005 execution_time [67.579µs; 67.617µs] or [-0.028%; +0.028%] None None None
credit_card/is_card_number/378282246310005 throughput [14789273.574op/s; 14797612.017op/s] or [-0.028%; +0.028%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.252µs; 45.289µs] or [-0.041%; +0.041%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [22080615.777op/s; 22098616.655op/s] or [-0.041%; +0.041%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.045µs; 6.058µs] or [-0.103%; +0.103%] None None None
credit_card/is_card_number/x371413321323331 throughput [165094372.913op/s; 165426531.505op/s] or [-0.100%; +0.100%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.913µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255529284.297op/s; 255582615.890op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.638µs; 65.671µs] or [-0.025%; +0.025%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15227421.285op/s; 15235185.054op/s] or [-0.025%; +0.025%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [53.013µs; 53.024µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18859223.535op/s; 18863177.640op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255557573.224op/s; 255612509.373op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [49.818µs; 49.831µs] or [-0.013%; +0.013%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [20067872.856op/s; 20072947.296op/s] or [-0.013%; +0.013%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.243µs; 45.282µs] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [22084049.612op/s; 22102869.919op/s] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.040µs; 6.052µs] or [-0.095%; +0.095%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165250400.922op/s; 165554823.165op/s] or [-0.092%; +0.092%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 9.982ms 10.212ms ± 0.066ms 10.207ms ± 0.033ms 10.244ms 10.332ms 10.388ms 10.437ms 2.25% -0.119 2.059 0.65% 0.005ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [10.202ms; 10.221ms] or [-0.090%; +0.090%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.951µs 5.050µs ± 0.049µs 5.049µs ± 0.039µs 5.090µs 5.127µs 5.130µs 5.133µs 1.68% 0.106 -1.145 0.96% 0.003µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
ip_address/quantize_peer_ip_address_benchmark execution_time [5.044µs; 5.057µs] or [-0.134%; +0.134%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 3.929ms 3.935ms ± 0.007ms 3.934ms ± 0.001ms 3.935ms 3.938ms 3.941ms 4.029ms 2.42% 11.860 154.826 0.18% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [3.934ms; 3.936ms] or [-0.025%; +0.025%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 18.006µs 25.487µs ± 9.285µs 18.352µs ± 0.172µs 34.200µs 42.876µs 44.124µs 66.121µs 260.30% 0.995 0.543 36.34% 0.657µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [24.200µs; 26.774µs] or [-5.049%; +5.049%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.329µs 2.390µs ± 0.023µs 2.389µs ± 0.005µs 2.395µs 2.423µs 2.435µs 2.603µs 8.99% 3.979 38.841 0.94% 0.002µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.387µs; 2.393µs] or [-0.131%; +0.131%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 186.172ns 188.787ns ± 2.071ns 188.430ns ± 1.450ns 189.890ns 192.673ns 195.809ns 197.534ns 4.83% 1.237 2.047 1.09% 0.146ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [188.500ns; 189.074ns] or [-0.152%; +0.152%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 89.145µs 89.425µs ± 0.174µs 89.427µs ± 0.057µs 89.477µs 89.563µs 89.968µs 91.057µs 1.82% 4.720 39.851 0.19% 0.012µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [89.401µs; 89.449µs] or [-0.027%; +0.027%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 245.697ns 256.250ns ± 12.725ns 251.407ns ± 3.846ns 256.640ns 289.327ns 292.574ns 295.910ns 17.70% 1.771 2.005 4.95% 0.900ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [254.486ns; 258.013ns] or [-0.688%; +0.688%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 33.367µs 33.893µs ± 0.870µs 33.509µs ± 0.067µs 33.595µs 35.716µs 35.752µs 37.441µs 11.73% 1.783 1.623 2.56% 0.062µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [33.772µs; 34.013µs] or [-0.356%; +0.356%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 204.842µs 205.451µs ± 0.377µs 205.369µs ± 0.236µs 205.680µs 206.176µs 206.572µs 206.648µs 0.62% 0.909 0.469 0.18% 0.027µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4839142.331op/s 4867349.263op/s ± 8908.905op/s 4869282.790op/s ± 5599.738op/s 4874114.146op/s 4878698.609op/s 4879959.396op/s 4881810.059op/s 0.26% -0.900 0.445 0.18% 629.955op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.576µs 18.649µs ± 0.049µs 18.640µs ± 0.027µs 18.674µs 18.722µs 18.817µs 18.918µs 1.49% 1.896 6.522 0.26% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 52860278.636op/s 53621912.923op/s ± 140242.957op/s 53648032.084op/s ± 77711.686op/s 53717275.283op/s 53783030.056op/s 53827240.911op/s 53834106.096op/s 0.35% -1.858 6.287 0.26% 9916.675op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.849µs 10.917µs ± 0.036µs 10.914µs ± 0.025µs 10.940µs 10.982µs 11.009µs 11.015µs 0.93% 0.379 -0.283 0.33% 0.003µs 1 200
normalization/normalize_name/normalize_name/good throughput 90784537.799op/s 91603938.756op/s ± 299587.499op/s 91628928.023op/s ± 213404.637op/s 91823358.030op/s 92063607.520op/s 92133946.911op/s 92176209.953op/s 0.60% -0.363 -0.302 0.33% 21184.035op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [205.399µs; 205.504µs] or [-0.025%; +0.025%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4866114.575op/s; 4868583.952op/s] or [-0.025%; +0.025%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.642µs; 18.656µs] or [-0.036%; +0.036%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [53602476.598op/s; 53641349.248op/s] or [-0.036%; +0.036%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.912µs; 10.922µs] or [-0.045%; +0.045%] None None None
normalization/normalize_name/normalize_name/good throughput [91562418.810op/s; 91645458.702op/s] or [-0.045%; +0.045%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 14.142ms 14.196ms ± 0.034ms 14.190ms ± 0.013ms 14.202ms 14.242ms 14.335ms 14.371ms 1.27% 2.773 9.562 0.24% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.191ms; 14.200ms] or [-0.033%; +0.033%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 532.999µs 533.728µs ± 0.381µs 533.713µs ± 0.255µs 533.943µs 534.338µs 534.697µs 535.396µs 0.32% 0.736 1.339 0.07% 0.027µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1867777.606op/s 1873615.382op/s ± 1336.101op/s 1873666.184op/s ± 895.741op/s 1874614.584op/s 1875584.472op/s 1875967.620op/s 1876176.542op/s 0.13% -0.730 1.319 0.07% 94.477op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 379.624µs 380.270µs ± 0.286µs 380.273µs ± 0.185µs 380.456µs 380.736µs 380.878µs 381.135µs 0.23% 0.080 -0.161 0.07% 0.020µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2623741.645op/s 2629708.975op/s ± 1974.550op/s 2629686.416op/s ± 1281.577op/s 2631177.497op/s 2632953.626op/s 2634020.962op/s 2634188.421op/s 0.17% -0.075 -0.163 0.07% 139.622op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 188.926µs 189.444µs ± 0.270µs 189.408µs ± 0.152µs 189.555µs 189.859µs 190.035µs 191.039µs 0.86% 1.940 8.497 0.14% 0.019µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5234525.535op/s 5278612.690op/s ± 7501.069op/s 5279607.327op/s ± 4243.869op/s 5283842.248op/s 5287286.868op/s 5291757.402op/s 5293064.782op/s 0.25% -1.912 8.302 0.14% 530.406op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.827µs 36.948µs ± 0.047µs 36.943µs ± 0.036µs 36.984µs 37.030µs 37.050µs 37.084µs 0.38% 0.254 -0.564 0.13% 0.003µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26965925.731op/s 27065199.645op/s ± 34592.148op/s 27068422.915op/s ± 26387.972op/s 27093941.271op/s 27113831.766op/s 27130246.704op/s 27154166.041op/s 0.32% -0.249 -0.567 0.13% 2446.034op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 44.934µs 45.172µs ± 0.223µs 45.163µs ± 0.136µs 45.265µs 45.441µs 46.309µs 46.729µs 3.47% 3.277 18.224 0.49% 0.016µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21400073.664op/s 22138334.922op/s ± 107388.878op/s 22141839.146op/s ± 66663.160op/s 22219251.429op/s 22250834.323op/s 22253259.695op/s 22255027.782op/s 0.51% -3.140 17.087 0.48% 7593.540op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [533.675µs; 533.781µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1873430.211op/s; 1873800.553op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [380.231µs; 380.310µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2629435.321op/s; 2629982.629op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [189.407µs; 189.482µs] or [-0.020%; +0.020%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5277573.114op/s; 5279652.266op/s] or [-0.020%; +0.020%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.941µs; 36.954µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27060405.505op/s; 27069993.784op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.141µs; 45.202µs] or [-0.068%; +0.068%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [22123451.856op/s; 22153217.987op/s] or [-0.067%; +0.067%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 10.628ms 10.655ms ± 0.013ms 10.653ms ± 0.007ms 10.661ms 10.679ms 10.695ms 10.711ms 0.55% 1.190 2.484 0.12% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.654ms; 10.657ms] or [-0.016%; +0.016%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.191µs 3.194µs ± 1.430µs 2.986µs ± 0.034µs 3.020µs 3.665µs 13.816µs 14.924µs 399.83% 7.378 55.542 44.67% 0.101µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.996µs; 3.392µs] or [-6.206%; +6.206%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 162.373µs 163.344µs ± 0.308µs 163.304µs ± 0.137µs 163.448µs 163.811µs 164.680µs 165.012µs 1.05% 1.853 8.524 0.19% 0.022µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [163.301µs; 163.386µs] or [-0.026%; +0.026%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 144.430µs 146.744µs ± 1.847µs 146.394µs ± 0.599µs 147.116µs 148.870µs 152.677µs 165.275µs 12.90% 5.928 51.708 1.26% 0.131µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [146.488µs; 147.000µs] or [-0.174%; +0.174%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 977d607 1765433836 dsn/r-and-d-exporter
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 60.390ms 61.238ms ± 1.871ms 61.045ms ± 0.082ms 61.124ms 61.393ms 69.768ms 79.995ms 31.04% 8.668 76.954 3.05% 0.132ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [60.979ms; 61.497ms] or [-0.423%; +0.423%] None None None

Baseline

Omitted due to size.

@danielsn danielsn force-pushed the dsn/r-and-d-exporter branch from a529caa to 0c12dc1 Compare December 5, 2025 03:36
@dd-octo-sts
Copy link

dd-octo-sts bot commented Dec 5, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.44 MB 7.44 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 86.25 MB 88.31 MB +2.39% (+2.06 MB) ⚠️
aarch64-apple-darwin
Artifact Baseline Commit Change
/aarch64-apple-darwin/lib/libdatadog_profiling.a 58.31 MB 58.91 MB +1.02% (+612.77 KB) ⚠️
/aarch64-apple-darwin/lib/libdatadog_profiling.dylib 8.43 MB 8.45 MB +.25% (+21.92 KB) 🔍
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 100.04 MB 102.19 MB +2.15% (+2.15 MB) ⚠️
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.54 MB 9.61 MB +.73% (+71.54 KB) 🔍
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 19.69 MB 19.74 MB +.25% (+52.00 KB) 🔍
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 69.82 KB 69.82 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 139.73 MB 148.05 MB +5.95% (+8.32 MB) 🚨
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 742.46 MB 816.66 MB +9.99% (+74.19 MB) 🚨
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 6.37 MB 6.38 MB +.13% (+9.00 KB) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 69.82 KB 69.82 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 19.73 MB 19.76 MB +.15% (+32.00 KB) 🔍
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 38.75 MB 38.81 MB +.16% (+65.92 KB) 🔍
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 16.80 MB 16.85 MB +.27% (+47.50 KB) 🔍
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 70.90 KB 70.90 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 142.34 MB 150.73 MB +5.89% (+8.39 MB) 🚨
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 730.71 MB 802.85 MB +9.87% (+72.13 MB) 🚨
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.88 MB 4.90 MB +.41% (+21.00 KB) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 70.90 KB 70.90 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 20.97 MB 21.01 MB +.22% (+48.00 KB) 🔍
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 36.51 MB 36.60 MB +.23% (+87.31 KB) 🔍
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 74.59 MB 76.58 MB +2.66% (+1.98 MB) ⚠️
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.86 MB 8.87 MB +.13% (+12.00 KB) 🔍
x86_64-apple-darwin
Artifact Baseline Commit Change
/x86_64-apple-darwin/lib/libdatadog_profiling.a 59.67 MB 60.43 MB +1.27% (+779.45 KB) ⚠️
/x86_64-apple-darwin/lib/libdatadog_profiling.dylib 9.49 MB 9.49 MB +.07% (+7.19 KB) 🔍
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 94.25 MB 97.01 MB +2.92% (+2.76 MB) ⚠️
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 10.29 MB 10.31 MB +.13% (+13.98 KB) 🔍

@danielsn danielsn force-pushed the dsn/r-and-d-exporter branch 3 times, most recently from 0e5a4d8 to f558ac5 Compare December 9, 2025 19:34
@datadog-official
Copy link

datadog-official bot commented Dec 9, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
* Fix with Cursor requires Datadog plugin ≥v2.17.0
🔗 Commit SHA: 977d607 | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@danielsn danielsn force-pushed the dsn/r-and-d-exporter branch from 3061ae7 to 884a217 Compare December 9, 2025 20:28
@danielsn danielsn marked this pull request as ready for review December 9, 2025 20:28
@danielsn danielsn requested review from a team as code owners December 9, 2025 20:28
@danielsn danielsn force-pushed the dsn/r-and-d-exporter branch from 884a217 to 9f79fca Compare December 9, 2025 20:33
…ing Tokio runtime

The spawn_dump_server function is called from FFI contexts where a Tokio
runtime may not be available. Converting it to use std::net::UnixListener
and std::thread::spawn instead of Tokio async primitives allows it to work
in any context. This fixes the test failure in reqwest_exporter::tests::test_file_endpoint.
The cbindgen rename value should not include the 'struct' keyword because
cbindgen automatically adds it when generating opaque struct typedefs.
Having 'struct' in the rename caused duplicate 'struct' keywords in the
generated C header, resulting in compilation errors.
@danielsn danielsn force-pushed the dsn/r-and-d-exporter branch from 701948c to 242f8f8 Compare December 10, 2025 04:35
@realFlowControl
Copy link
Member

It feels like this will merge conflict with #1382 later 😉

@ivoanjo
Copy link
Member

ivoanjo commented Dec 10, 2025

So I'm kinda curious about what's the objective/expected gains for this change and how we'll migrate to it.

Specifically, reqwest still uses hyper AND tokio under the hood, so is the expected gain that our code becomes simpler?

Also, the new exporter is getting added side-by-side with the old one. Is that a temporary thing, for validation? Could we tweak things a bit so that we can keep the same APIs, and maybe add a separate call/argument/env variable that toggles between both behaviors?

Copy link
Member

@realFlowControl realFlowControl left a comment

Choose a reason for hiding this comment

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

The C/C++ bindings look okay to me, but as I won't consume them, @ivoanjo as one of the users should have a look at them as well.
Upgrade path for dd-trace-php looks easy, some tests are still failing.

The big thing for me: I am really not 100% sure anymore because this all started a long time ago and we seemed to have missed to chance to write a RFC for it. But wasn't the initial idea of switching away from Hyper bound to the idea of getting rid of Tokio? Or was it just because of the Hyper upgrade path being horrible and reqwest offering a nice wrapper around that?

TLDR: could you add to the description which problem we are solving?

Comment on lines 140 to 142
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()?;
Copy link
Member

Choose a reason for hiding this comment

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

This creates a new Tokio runtime every time we do an export (~every 60 seconds) and throws it away on return of this function. I do not have any numbers but this feels heavy and I was wondering if we could "cache" the instance and re-use it.

// Create a tokio runtime for this blocking call
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()?;
Copy link
Member

Choose a reason for hiding this comment

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

(same as for the C-Bindings): This creates a new Tokio runtime every time we do an export (~every 60 seconds) and throws it away on return of this function. I do not have any numbers but this feels heavy and I was wondering if we could "cache" the instance and re-use it.

}

/// Build and send a profile. Returns the HTTP status code.
pub async fn send(
Copy link
Member

Choose a reason for hiding this comment

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

The current Hyper based ProfileExporter in

pub fn send(
&self,
request: Request,
cancel: Option<&CancellationToken>,
) -> anyhow::Result<HttpResponse> {
self.exporter
.runtime
.block_on(request.send(&self.exporter.client, cancel))
}

exposes this functions as sync/blocking one. Basically it had the Tokio runtime as an invariant and with this change, a consumer of this API would need to bring their own Tokio runtime. I guess this is fine, just wanted to make sure this is on purpose.
For the dd-trace-php that would mean that we would have Tokio than as a first class dependency and not just a dependency of a dependency anymore.

@ekump
Copy link
Contributor

ekump commented Dec 10, 2025

So I'm kinda curious about what's the objective/expected gains for this change and how we'll migrate to it.

I don't want to stick my nose into profiling business, but just thinking about this from a wider perspective - Isn't the lack of windows named pipe support a dealbreaker for broader adoption of reqwest? Is it worth it for profiling to use a different library than others?

@danielsn
Copy link
Contributor Author

So I'm kinda curious about what's the objective/expected gains for this change and how we'll migrate to it.

I don't want to stick my nose into profiling business, but just thinking about this from a wider perspective - Isn't the lack of windows named pipe support a dealbreaker for broader adoption of reqwest? Is it worth it for profiling to use a different library than others?

Windows named pipe support is coming soon seanmonstar/reqwest#2789

@ekump
Copy link
Contributor

ekump commented Dec 10, 2025

So I'm kinda curious about what's the objective/expected gains for this change and how we'll migrate to it.

I don't want to stick my nose into profiling business, but just thinking about this from a wider perspective - Isn't the lack of windows named pipe support a dealbreaker for broader adoption of reqwest? Is it worth it for profiling to use a different library than others?

Windows named pipe support is coming soon seanmonstar/reqwest#2789

Awesome! Then ignore everything I said.

Copy link
Contributor

@morrisonlevi morrisonlevi left a comment

Choose a reason for hiding this comment

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

I've been interrupted by my kids' evening activities, so I haven't finished, but here's my partial review.

Copy link
Contributor

Choose a reason for hiding this comment

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

./build-and-run-profiling.sh: Permission denied

Looks like there's a permissions issue, or launch it with bash instead.

"Handle_EncodedProfile" = "ddog_prof_EncodedProfile"
"Result_HandleEncodedProfile" = "ddog_prof_EncodedProfile_Result"

"CancellationToken" = "struct ddog_OpaqueCancellationToken"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious, did you just stumble across this in your editor or some other way? If this PR doesn't merge for whatever reason, this should probably get pulled out in merged in separately.

Comment on lines +6 to +7
# Usage: ./build-and-run.sh <crate-name> <example-name>
# Example: ./build-and-run.sh libdd-profiling profiling
Copy link
Contributor

Choose a reason for hiding this comment

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

On macOS, I'm getting an error:

% cd libdatadog/examples/cxx
% ./build-and-run.sh libdd-profiling profiling
🔨 Building libdd-profiling with cxx feature...
warning: /Users/levi.morrison/go/src/github.com/morrisonlevi/libdatadog_php_profiler/libdatadog/libdd-crashtracker-ffi/Cargo.toml: unused manifest key: target.cfg(windows).features
    Finished `release` profile [optimized + debuginfo] target(s) in 0.21s
🔍 Finding CXX bridge headers...
📁 CXX include: target/release/build/libdd-profiling-9f264d581b94506e/out/cxxbridge/include
📁 CXX crate: target/release/build/libdd-profiling-9f264d581b94506e/out/cxxbridge/crate
📁 Rust CXX: target/release/build/cxx-ec62046ac43cc104/out
🔨 Finding libraries...
❌ Error: Could not find libdd-profiling library at $srcdir/libdatadog/target/release/liblibdd_profiling.a

Notice the filename liblibdd_profiling.a, with lib repeated twice.

#include <memory>
#include <thread>

static ddog_CharSlice to_slice_c_char(const char *s) { return {.ptr = s, .len = strlen(s)}; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the cxx-ified version not end up with the DDOG_CHARSLICE_C and DDOG_CHARSLICE_C_BARE macros? Shouldn't need this unless you need an actual function for something.

Comment on lines +48 to +60
pub struct File<'a> {
pub name: &'a str,
pub bytes: &'a [u8],
}

impl<'a> From<super::File<'a>> for File<'a> {
fn from(file: super::File<'a>) -> Self {
Self {
name: file.name,
bytes: file.bytes,
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any differences between File and super::File, they are both:

pub struct File<'a> {
    pub name: &'a str,
    pub bytes: &'a [u8],
}

What's the reason for duplicating it?

@danielsn
Copy link
Contributor Author

Supplanted by #1412

@danielsn danielsn closed this Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants