Skip to content

Conversation

@ekump
Copy link
Contributor

@ekump ekump commented Jun 9, 2025

What does this PR do?

As part of #915 we replaced the usage of the external lazy_static and once_cell crates with std::sync::OnceLock for lazily initializing static variables. The majority of places where use use std::sync::OnceLock is to initialize on first access. For those cases, this PR switches to use std::sync::LazyLock. Functionally, things are the same but the code is slightly simpler, and it's clearer that you are dealing with a static object.

Motivation

LazyLock wasn't stabilized until Rust 1.80. Now that libdatadog's MSRV is 1.84.1 we can use it.

Additional Notes

There were a couple of places where we left OnceLock because it seemed to be simpler or more appropriate.

How to test the change?

No functionality should have changed. All unit tests should still work.

@github-actions github-actions bot added profiling Relates to the profiling* modules. mini-agent sidecar common labels Jun 9, 2025
@r1viollet
Copy link
Contributor

r1viollet commented Jun 9, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 22.02 MB 21.99 MB --.12% (-29.10 KB) 💪
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 9.16 MB 9.16 MB --.02% (-1.99 KB) 💪
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 69.99 MB 69.95 MB --.06% (-46.11 KB) 💪
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 81.71 MB 81.67 MB --.04% (-39.11 KB) 💪
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 25.91 MB 25.88 MB --.10% (-28.40 KB) 💪
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.08 MB 9.08 MB --.01% (-1.32 KB) 💪
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 16.02 MB 16.02 MB --.01% (-2.00 KB) 💪
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 62.65 KB 62.65 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 109.19 MB 109.13 MB --.05% (-56.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 583.53 MB 584.33 MB +.13% (+814.05 KB) 🔍
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 5.01 MB 5.01 MB +0% (+512 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 62.65 KB 62.65 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 15.54 MB 15.54 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 28.59 MB 28.58 MB --.02% (-6.60 KB) 💪
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 13.58 MB 13.58 MB --.01% (-1.50 KB) 💪
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 63.60 KB 63.60 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 110.95 MB 110.90 MB --.04% (-56.00 KB) 💪
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 575.01 MB 575.07 MB +0% (+57.86 KB) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 3.78 MB 3.78 MB +.01% (+512 B) 🔍
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 63.60 KB 63.60 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 16.51 MB 16.51 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 26.79 MB 26.79 MB --.02% (-5.58 KB) 💪
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 62.72 MB 62.68 MB --.06% (-44.40 KB) 💪
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.81 MB 9.80 MB --.05% (-5.42 KB) 💪
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 20.86 MB 20.83 MB --.13% (-28.23 KB) 💪
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 76.75 MB 76.72 MB --.04% (-35.57 KB) 💪
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.70 MB 9.70 MB --.01% (-1.02 KB) 💪
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 23.86 MB 23.84 MB --.10% (-26.32 KB) 💪

@pr-commenter
Copy link

pr-commenter bot commented Jun 9, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-06-10 15:16:01

Comparing candidate commit d7943c4 in PR branch ekump/APMSP-2091-switch-from-oncelock-to-lazylock with baseline commit f356aec in branch main.

Found 8 performance improvements and 6 performance regressions! Performance is the same for 38 metrics, 2 unstable metrics.

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

  • 🟥 execution_time [+3.385µs; +3.737µs] or [+4.303%; +4.750%]
  • 🟥 throughput [-575839.823op/s; -522500.232op/s] or [-4.530%; -4.111%]

scenario:credit_card/is_card_number/37828224631000521389798

  • 🟩 execution_time [-6.557µs; -6.511µs] or [-12.562%; -12.475%]
  • 🟩 throughput [+2731286.479op/s; +2752837.599op/s] or [+14.255%; +14.368%]

scenario:credit_card/is_card_number/x371413321323331

  • 🟥 execution_time [+401.185ns; +402.564ns] or [+6.650%; +6.672%]
  • 🟥 throughput [-10368971.795op/s; -10333273.885op/s] or [-6.256%; -6.234%]

scenario:credit_card/is_card_number_no_luhn/ 378282246310005

  • 🟩 execution_time [-4.253µs; -4.206µs] or [-7.282%; -7.203%]
  • 🟩 throughput [+1330025.151op/s; +1344039.937op/s] or [+7.767%; +7.849%]

scenario:credit_card/is_card_number_no_luhn/378282246310005

  • 🟩 execution_time [-4.463µs; -4.397µs] or [-8.132%; -8.012%]
  • 🟩 throughput [+1588632.719op/s; +1610956.905op/s] or [+8.718%; +8.841%]

scenario:credit_card/is_card_number_no_luhn/37828224631000521389798

  • 🟩 execution_time [-6.571µs; -6.528µs] or [-12.585%; -12.502%]
  • 🟩 throughput [+2737014.329op/s; +2757400.768op/s] or [+14.291%; +14.397%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟥 execution_time [+402.785ns; +404.621ns] or [+6.675%; +6.705%]
  • 🟥 throughput [-10415356.950op/s; -10368223.073op/s] or [-6.285%; -6.256%]

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 d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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 242.593ns 251.888ns ± 11.298ns 248.265ns ± 3.358ns 251.553ns 281.724ns 288.946ns 291.659ns 17.48% 2.041 3.335 4.47% 0.799ns 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 [250.322ns; 253.454ns] or [-0.622%; +0.622%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.063µs 27.173µs ± 9.339µs 19.522µs ± 0.560µs 34.125µs 42.747µs 45.198µs 68.097µs 248.82% 1.034 1.624 34.28% 0.660µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [25.879µs; 28.467µs] or [-4.763%; +4.763%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.331µs 2.400µs ± 0.019µs 2.402µs ± 0.005µs 2.406µs 2.428µs 2.432µs 2.436µs 1.43% -1.725 4.551 0.77% 0.001µ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.397µs; 2.403µs] or [-0.107%; +0.107%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.948µs 34.549µs ± 0.933µs 34.138µs ± 0.091µs 34.266µs 36.530µs 36.583µs 37.752µs 10.58% 1.721 1.147 2.69% 0.066µ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 [34.419µs; 34.678µs] or [-0.374%; +0.374%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.895µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.918µs 3.920µs 3.921µs 0.24% -0.132 3.708 0.08% 0.000µs 1 200
credit_card/is_card_number/ throughput 255029906.148op/s 255601134.497op/s ± 206608.245op/s 255634012.106op/s ± 110895.718op/s 255729987.555op/s 255856890.561op/s 255908094.413op/s 256723344.338op/s 0.43% 0.146 3.768 0.08% 14609.409op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 78.920µs 82.237µs ± 1.084µs 82.182µs ± 0.760µs 82.977µs 84.084µs 84.468µs 84.973µs 3.40% -0.092 -0.199 1.31% 0.077µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 11768424.795op/s 12162149.197op/s ± 160558.228op/s 12168060.524op/s ± 112447.911op/s 12265630.015op/s 12433431.195op/s 12510047.159op/s 12671110.626op/s 4.13% 0.163 -0.145 1.32% 11353.181op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 71.499µs 71.957µs ± 0.397µs 71.860µs ± 0.240µs 72.142µs 72.814µs 73.102µs 73.182µs 1.84% 1.152 0.667 0.55% 0.028µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13664501.875op/s 13897595.512op/s ± 76110.232op/s 13915968.574op/s ± 46529.666op/s 13957932.415op/s 13979849.194op/s 13985481.064op/s 13986185.673op/s 0.50% -1.130 0.603 0.55% 5381.806op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.896µs 3.913µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.918µs 3.920µs 3.922µs 0.24% -0.494 5.966 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254975665.130op/s 255571238.274op/s ± 189079.689op/s 255591871.872op/s ± 105075.602op/s 255683994.197op/s 255812950.372op/s 255932381.532op/s 256703299.174op/s 0.43% 0.511 6.052 0.07% 13369.953op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 68.345µs 68.939µs ± 0.385µs 68.878µs ± 0.249µs 69.145µs 69.664µs 69.966µs 70.097µs 1.77% 0.659 -0.107 0.56% 0.027µs 1 200
credit_card/is_card_number/378282246310005 throughput 14265929.033op/s 14506130.310op/s ± 80806.540op/s 14518525.664op/s ± 52700.558op/s 14567580.610op/s 14617134.571op/s 14628358.448op/s 14631749.433op/s 0.78% -0.635 -0.153 0.56% 5713.885op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 45.365µs 45.659µs ± 0.160µs 45.665µs ± 0.135µs 45.791µs 45.898µs 45.926µs 45.985µs 0.70% -0.080 -1.156 0.35% 0.011µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21746379.228op/s 21901692.380op/s ± 76789.053op/s 21898461.633op/s ± 64674.481op/s 21968846.540op/s 22022964.124op/s 22035838.162op/s 22043219.204op/s 0.66% 0.089 -1.156 0.35% 5429.806op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.428µs 6.435µs ± 0.003µs 6.434µs ± 0.002µs 6.437µs 6.441µs 6.446µs 6.449µs 0.23% 0.960 1.700 0.05% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 155054321.895op/s 155398084.095op/s ± 83942.567op/s 155412285.342op/s ± 50116.799op/s 155458145.233op/s 155509041.386op/s 155543993.147op/s 155575800.655op/s 0.11% -0.955 1.686 0.05% 5935.636op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.891µs 3.912µs ± 0.003µs 3.912µs ± 0.001µs 3.913µs 3.915µs 3.917µs 3.919µs 0.20% -2.116 17.443 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255135258.106op/s 255651388.872op/s ± 169110.165op/s 255653202.682op/s ± 95108.174op/s 255743361.287op/s 255862390.744op/s 255930965.426op/s 256978674.489op/s 0.52% 2.146 17.710 0.07% 11957.894op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 61.074µs 62.603µs ± 0.638µs 62.597µs ± 0.490µs 63.093µs 63.636µs 63.793µs 64.302µs 2.72% -0.048 -0.513 1.02% 0.045µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15551527.032op/s 15975347.717op/s ± 162861.922op/s 15975269.767op/s ± 124519.567op/s 16096959.671op/s 16223702.326op/s 16346199.061op/s 16373494.753op/s 2.49% 0.093 -0.504 1.02% 11516.077op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 53.962µs 54.167µs ± 0.073µs 54.168µs ± 0.048µs 54.211µs 54.285µs 54.359µs 54.365µs 0.36% 0.092 -0.001 0.13% 0.005µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18394213.041op/s 18461483.265op/s ± 24828.386op/s 18461030.611op/s ± 16301.774op/s 18478234.036op/s 18497492.575op/s 18514541.186op/s 18531559.245op/s 0.38% -0.084 -0.005 0.13% 1755.632op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.893µs 3.912µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.917µs 3.918µs 3.922µs 0.26% -0.964 8.216 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254954513.004op/s 255597925.777op/s ± 190380.960op/s 255617665.550op/s ± 115196.132op/s 255720342.557op/s 255842097.259op/s 255918319.572op/s 256846614.657op/s 0.48% 0.985 8.351 0.07% 13461.967op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 50.253µs 50.451µs ± 0.085µs 50.441µs ± 0.052µs 50.498µs 50.574µs 50.646µs 50.971µs 1.05% 1.500 7.026 0.17% 0.006µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 19618807.555op/s 19821275.754op/s ± 33330.743op/s 19825082.007op/s ± 20454.852op/s 19844374.240op/s 19868601.550op/s 19880909.969op/s 19899215.971op/s 0.37% -1.466 6.807 0.17% 2356.839op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 45.350µs 45.663µs ± 0.150µs 45.671µs ± 0.116µs 45.766µs 45.896µs 45.950µs 46.037µs 0.80% -0.036 -0.767 0.33% 0.011µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21721893.506op/s 21899840.972op/s ± 72027.964op/s 21895595.719op/s ± 55637.040op/s 21958370.290op/s 22026071.175op/s 22039417.389op/s 22050865.406op/s 0.71% 0.049 -0.768 0.33% 5093.146op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.430µs 6.438µs ± 0.005µs 6.437µs ± 0.003µs 6.441µs 6.448µs 6.450µs 6.451µs 0.21% 0.712 -0.142 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 155026046.171op/s 155328878.978op/s ± 118503.087op/s 155353153.274op/s ± 74211.881op/s 155417772.022op/s 155493650.718op/s 155511813.927op/s 155522209.352op/s 0.11% -0.709 -0.147 0.08% 8379.434op/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 [255572500.581op/s; 255629768.412op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [82.086µs; 82.387µs] or [-0.183%; +0.183%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12139897.371op/s; 12184401.023op/s] or [-0.183%; +0.183%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [71.902µs; 72.012µs] or [-0.076%; +0.076%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13887047.366op/s; 13908143.658op/s] or [-0.076%; +0.076%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631 throughput [255545033.648op/s; 255597442.900op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.885µs; 68.992µs] or [-0.077%; +0.077%] None None None
credit_card/is_card_number/378282246310005 throughput [14494931.301op/s; 14517329.320op/s] or [-0.077%; +0.077%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.637µs; 45.681µs] or [-0.049%; +0.049%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [21891050.156op/s; 21912334.604op/s] or [-0.049%; +0.049%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.435µs; 6.436µs] or [-0.007%; +0.007%] None None None
credit_card/is_card_number/x371413321323331 throughput [155386450.462op/s; 155409717.727op/s] or [-0.007%; +0.007%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.911µs; 3.912µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ throughput [255627951.830op/s; 255674825.915op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [62.515µs; 62.691µs] or [-0.141%; +0.141%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15952776.621op/s; 15997918.813op/s] or [-0.141%; +0.141%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [54.157µs; 54.177µs] or [-0.019%; +0.019%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18458042.289op/s; 18464924.240op/s] or [-0.019%; +0.019%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255571540.807op/s; 255624310.747op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [50.439µs; 50.463µs] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [19816656.434op/s; 19825895.075op/s] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.642µs; 45.684µs] or [-0.046%; +0.046%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [21889858.588op/s; 21909823.355op/s] or [-0.046%; +0.046%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.437µs; 6.439µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [155312455.590op/s; 155345302.366op/s] or [-0.011%; +0.011%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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 72.626ms 72.814ms ± 0.146ms 72.772ms ± 0.042ms 72.827ms 73.074ms 73.472ms 73.610ms 1.15% 3.043 11.081 0.20% 0.010ms 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 [72.794ms; 72.835ms] or [-0.028%; +0.028%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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 8.150ms 8.172ms ± 0.009ms 8.171ms ± 0.006ms 8.178ms 8.189ms 8.201ms 8.208ms 0.46% 0.827 1.039 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 [8.171ms; 8.174ms] or [-0.016%; +0.016%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.278µs 3.291µs ± 1.481µs 3.052µs ± 0.031µs 3.095µs 3.719µs 14.546µs 15.288µs 400.89% 7.309 54.677 44.88% 0.105µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [3.086µs; 3.496µs] or [-6.235%; +6.235%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.194µs 532.995µs ± 0.523µs 532.915µs ± 0.241µs 533.180µs 533.746µs 533.995µs 538.005µs 0.96% 4.601 40.383 0.10% 0.037µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1858718.379op/s 1876191.279op/s ± 1832.850op/s 1876473.308op/s ± 848.152op/s 1877198.375op/s 1878234.499op/s 1878694.259op/s 1879013.628op/s 0.14% -4.539 39.590 0.10% 129.602op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 381.292µs 381.983µs ± 0.290µs 381.946µs ± 0.182µs 382.189µs 382.496µs 382.655µs 382.835µs 0.23% 0.396 -0.175 0.08% 0.020µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2612089.294op/s 2617919.128op/s ± 1983.721op/s 2618173.391op/s ± 1249.964op/s 2619345.197op/s 2620834.277op/s 2621740.972op/s 2622661.598op/s 0.17% -0.392 -0.178 0.08% 140.270op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 188.953µs 189.475µs ± 0.259µs 189.450µs ± 0.153µs 189.608µs 189.921µs 190.342µs 190.592µs 0.60% 1.081 2.731 0.14% 0.018µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5246816.998op/s 5277756.367op/s ± 7195.966op/s 5278428.653op/s ± 4270.829op/s 5282430.747op/s 5288153.663op/s 5290447.850op/s 5292322.089op/s 0.26% -1.067 2.674 0.14% 508.832op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.543µs 37.658µs ± 0.049µs 37.650µs ± 0.027µs 37.677µs 37.752µs 37.799µs 37.835µs 0.49% 0.896 1.054 0.13% 0.003µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26430467.426op/s 26555078.694op/s ± 34247.788op/s 26560507.970op/s ± 18793.059op/s 26579156.620op/s 26597296.544op/s 26609649.452op/s 26635777.521op/s 0.28% -0.887 1.034 0.13% 2421.684op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 44.911µs 45.089µs ± 0.163µs 45.053µs ± 0.135µs 45.239µs 45.359µs 45.403µs 45.468µs 0.92% 0.439 -1.231 0.36% 0.012µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21993393.185op/s 22178738.717op/s ± 79967.610op/s 22196140.459op/s ± 66784.437op/s 22261160.014op/s 22264431.461op/s 22265270.501op/s 22266485.797op/s 0.32% -0.433 -1.239 0.36% 5654.564op/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 [532.923µs; 533.068µs] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1875937.264op/s; 1876445.295op/s] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [381.943µs; 382.023µs] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2617644.203op/s; 2618194.052op/s] or [-0.011%; +0.011%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [189.439µs; 189.511µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5276759.075op/s; 5278753.659op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.651µs; 37.664µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26550332.280op/s; 26559825.108op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.066µs; 45.111µs] or [-0.050%; +0.050%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [22167655.976op/s; 22189821.459op/s] or [-0.050%; +0.050%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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 87.624µs 87.860µs ± 0.163µs 87.833µs ± 0.062µs 87.909µs 88.058µs 88.251µs 89.293µs 1.66% 4.888 36.378 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 [87.837µs; 87.883µs] or [-0.026%; +0.026%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.327µs 204.847µs ± 0.355µs 204.783µs ± 0.207µs 205.015µs 205.478µs 205.918µs 206.590µs 0.88% 1.426 3.370 0.17% 0.025µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4840509.148op/s 4881696.919op/s ± 8441.829op/s 4883222.679op/s ± 4938.382op/s 4887940.819op/s 4891941.378op/s 4893367.615op/s 4894120.983op/s 0.22% -1.409 3.282 0.17% 596.927op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.622µs 18.813µs ± 0.084µs 18.810µs ± 0.061µs 18.872µs 18.950µs 19.056µs 19.093µs 1.50% 0.363 0.234 0.45% 0.006µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 52376587.665op/s 53156972.677op/s ± 237836.823op/s 53162121.305op/s ± 170865.931op/s 53327163.073op/s 53521058.606op/s 53624480.454op/s 53700804.602op/s 1.01% -0.335 0.186 0.45% 16817.603op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.774µs 10.878µs ± 0.045µs 10.881µs ± 0.031µs 10.910µs 10.947µs 10.981µs 10.987µs 0.97% -0.113 -0.416 0.41% 0.003µs 1 200
normalization/normalize_name/normalize_name/good throughput 91017731.088op/s 91931482.862op/s ± 379031.013op/s 91899900.682op/s ± 264603.828op/s 92187156.123op/s 92593741.318op/s 92735819.230op/s 92817288.106op/s 1.00% 0.133 -0.418 0.41% 26801.540op/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 [204.798µs; 204.897µs] or [-0.024%; +0.024%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4880526.962op/s; 4882866.875op/s] or [-0.024%; +0.024%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.801µs; 18.824µs] or [-0.062%; +0.062%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [53124010.781op/s; 53189934.574op/s] or [-0.062%; +0.062%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.872µs; 10.884µs] or [-0.057%; +0.057%] None None None
normalization/normalize_name/normalize_name/good throughput [91878952.809op/s; 91984012.915op/s] or [-0.057%; +0.057%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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.961µs 5.038µs ± 0.035µs 5.043µs ± 0.026µs 5.066µs 5.089µs 5.094µs 5.101µs 1.16% -0.286 -1.123 0.70% 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.033µs; 5.043µs] or [-0.097%; +0.097%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz d7943c4 1749567822 ekump/APMSP-2091-switch-from-oncelock-to-lazylock
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 149.972µs 150.837µs ± 0.315µs 150.774µs ± 0.169µs 150.980µs 151.379µs 151.936µs 152.086µs 0.87% 1.153 2.840 0.21% 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 [150.793µs; 150.881µs] or [-0.029%; +0.029%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 87.86127% with 42 lines in your changes missing coverage. Please review.

Project coverage is 71.03%. Comparing base (f356aec) to head (d7943c4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1096      +/-   ##
==========================================
- Coverage   71.03%   71.03%   -0.01%     
==========================================
  Files         335      335              
  Lines       51081    51017      -64     
==========================================
- Hits        36287    36241      -46     
+ Misses      14794    14776      -18     
Components Coverage Δ
datadog-crashtracker 44.38% <ø> (-0.03%) ⬇️
datadog-crashtracker-ffi 6.03% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 89.35% <ø> (ø)
data-pipeline-ffi 88.94% <ø> (ø)
ddcommon 78.91% <89.79%> (-0.17%) ⬇️
ddcommon-ffi 68.64% <ø> (ø)
ddtelemetry 60.17% <ø> (ø)
ddtelemetry-ffi 21.32% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.68% <ø> (ø)
datadog-profiling 77.17% <100.00%> (ø)
datadog-profiling-ffi 62.12% <ø> (ø)
datadog-sidecar 42.10% <73.49%> (-0.22%) ⬇️
datdog-sidecar-ffi 10.36% <ø> (ø)
spawn-worker 55.35% <ø> (ø)
tinybytes 90.96% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <100.00%> (+<0.01%) ⬆️
datadog-trace-protobuf 77.10% <ø> (ø)
datadog-trace-utils 89.23% <0.00%> (ø)
datadog-log 76.31% <0.00%> (-0.10%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ekump ekump marked this pull request as ready for review June 9, 2025 20:00
@ekump ekump requested review from a team as code owners June 9, 2025 20:00
Comment on lines 4 to 5
#[cfg(feature = "logging")]
use log::{debug, warn};
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep the cfgd imports after the unconditional ones?

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 left a small note but overall looks good!

@ekump ekump force-pushed the ekump/APMSP-2091-switch-from-oncelock-to-lazylock branch from 4005c34 to d7943c4 Compare June 10, 2025 15:03
@ekump
Copy link
Contributor Author

ekump commented Jun 10, 2025

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jun 10, 2025

View all feedbacks in Devflow UI.

2025-06-10 15:04:45 UTC ℹ️ Start processing command /merge


2025-06-10 15:04:57 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-06-10 15:50:52 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

@ekump
Copy link
Contributor Author

ekump commented Jun 10, 2025

/remove

@dd-devflow
Copy link

dd-devflow bot commented Jun 10, 2025

View all feedbacks in Devflow UI.

2025-06-10 15:50:44 UTC ℹ️ Start processing command /remove


2025-06-10 15:50:49 UTC ℹ️ Devflow: /remove

@ekump
Copy link
Contributor Author

ekump commented Jun 10, 2025

all checks is failing again because of the merge queue. Bypassing rules to merge. Everything else passed.

@ekump ekump merged commit 8aecbce into main Jun 10, 2025
35 of 39 checks passed
@ekump ekump deleted the ekump/APMSP-2091-switch-from-oncelock-to-lazylock branch June 10, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants