Skip to content

Conversation

ekump
Copy link
Contributor

@ekump ekump commented May 2, 2025

What does this PR do?

Adds a github action that scans the repo for usages of clippy allow annotations and reports changes across all crates in the repo.

If the action fails, it should not fail CI and block PRs being merged. If for any reason this action causes issues, feel free to disable it. This report shouldn't impede anyone's work in libdatadog.

Motivation

We want to reduce the chance of libdatadog panicking as much as possible. #915 enabled clippy warnings for panic macros in all crates. This PR will start reporting the number of annotations to bring attention to new additions of allow annotations or PRs that reduce the use of the annotations.

Additional Notes

This code is not part of the libdatadog workspace. It's an independent crate. It's included in this repo as it is expected we will need to make tweaks and fix bugs. Once we feel it is stable it should be moved to a separate repo and treated like any other github action we use.

allow annotations from unit tests for the reporter are currently showing up in the report. The option to filter certain file paths or crates will be added in a follow up PR.

Apologies for the size of the PR. I didn't anticipate it being this large.

Here is what the report looks like when crates have been changed:

Screenshot 2025-05-31 at 10 39 37 PM

How to test the change?

Unit tests were added where possible. I verified the report by adding extra allows and observing changes in the report.

@pr-commenter
Copy link

pr-commenter bot commented May 2, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-07-24 19:24:54

Comparing candidate commit 0a96a8f in PR branch ekump/clippy-annotation-action with baseline commit 740b396 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 2 unstable metrics.

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 0a96a8f 1753384368 ekump/clippy-annotation-action
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 13.646ms 13.699ms ± 0.028ms 13.694ms ± 0.013ms 13.709ms 13.734ms 13.810ms 13.875ms 1.32% 2.687 11.259 0.21% 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 [13.695ms; 13.702ms] or [-0.029%; +0.029%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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.303µs 2.354µs ± 0.013µs 2.357µs ± 0.004µs 2.360µs 2.371µs 2.375µs 2.381µs 0.99% -1.859 4.646 0.55% 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.352µs; 2.356µs] or [-0.077%; +0.077%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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.530ms 61.002ms ± 1.871ms 60.674ms ± 0.050ms 60.742ms 62.356ms 69.470ms 80.550ms 32.76% 8.194 73.259 3.06% 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.742ms; 61.261ms] or [-0.425%; +0.425%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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.245ms 8.261ms ± 0.009ms 8.260ms ± 0.005ms 8.265ms 8.279ms 8.289ms 8.294ms 0.41% 0.994 1.279 0.11% 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.260ms; 8.262ms] or [-0.015%; +0.015%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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 84.800µs 85.290µs ± 0.176µs 85.288µs ± 0.062µs 85.349µs 85.412µs 85.661µs 87.220µs 2.27% 6.543 70.823 0.21% 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 [85.266µs; 85.315µs] or [-0.029%; +0.029%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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 206.213µs 206.645µs ± 0.312µs 206.606µs ± 0.132µs 206.749µs 206.994µs 207.097µs 210.106µs 1.69% 6.952 74.213 0.15% 0.022µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4759509.693op/s 4839239.552op/s ± 7223.854op/s 4840141.887op/s ± 3083.114op/s 4842960.621op/s 4845869.429op/s 4847551.263op/s 4849350.980op/s 0.19% -6.827 72.358 0.15% 510.804op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.198µs 18.337µs ± 0.106µs 18.302µs ± 0.039µs 18.358µs 18.563µs 18.668µs 18.744µs 2.41% 1.516 1.946 0.58% 0.008µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 53350620.728op/s 54535356.827op/s ± 313664.197op/s 54637658.218op/s ± 117630.579op/s 54714757.168op/s 54880878.231op/s 54948598.011op/s 54951245.777op/s 0.57% -1.487 1.841 0.57% 22179.408op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.919µs 10.987µs ± 0.048µs 10.983µs ± 0.024µs 11.006µs 11.052µs 11.078µs 11.450µs 4.25% 4.719 42.739 0.43% 0.003µs 1 200
normalization/normalize_name/normalize_name/good throughput 87336764.610op/s 91018148.776op/s ± 387114.905op/s 91052787.510op/s ± 195532.026op/s 91246331.753op/s 91444195.965op/s 91551155.885op/s 91581254.427op/s 0.58% -4.437 39.135 0.42% 27373.157op/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 [206.601µs; 206.688µs] or [-0.021%; +0.021%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4838238.395op/s; 4840240.708op/s] or [-0.021%; +0.021%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.323µs; 18.352µs] or [-0.080%; +0.080%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [54491885.986op/s; 54578827.668op/s] or [-0.080%; +0.080%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.980µs; 10.994µs] or [-0.060%; +0.060%] None None None
normalization/normalize_name/normalize_name/good throughput [90964498.373op/s; 91071799.179op/s] or [-0.059%; +0.059%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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 246.969ns 257.230ns ± 14.117ns 248.957ns ± 1.505ns 265.762ns 286.884ns 295.720ns 298.035ns 19.71% 1.426 0.646 5.47% 0.998ns 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 [255.274ns; 259.187ns] or [-0.761%; +0.761%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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 142.881µs 143.795µs ± 0.534µs 143.669µs ± 0.383µs 144.175µs 144.485µs 145.241µs 146.706µs 2.11% 1.256 3.902 0.37% 0.038µ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 [143.721µs; 143.869µs] or [-0.051%; +0.051%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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.911µs ± 0.003µs 3.911µs ± 0.001µs 3.913µs 3.916µs 3.918µs 3.919µs 0.20% -0.560 6.268 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255193695.708op/s 255683260.770op/s ± 180349.163op/s 255714601.305op/s ± 94027.830op/s 255792884.791op/s 255901306.050op/s 255992583.397op/s 256791904.859op/s 0.42% 0.577 6.366 0.07% 12752.612op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 78.800µs 80.626µs ± 0.806µs 80.527µs ± 0.565µs 81.262µs 82.099µs 82.496µs 82.660µs 2.65% 0.302 -0.460 1.00% 0.057µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12097714.410op/s 12404163.814op/s ± 123721.017op/s 12418251.181op/s ± 87807.719op/s 12496987.562op/s 12580691.825op/s 12633487.306op/s 12690342.342op/s 2.19% -0.258 -0.488 0.99% 8748.397op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 74.266µs 74.919µs ± 0.202µs 74.883µs ± 0.097µs 75.020µs 75.286µs 75.489µs 75.562µs 0.91% 0.498 1.253 0.27% 0.014µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13234239.823op/s 13347901.950op/s ± 36025.949op/s 13354172.487op/s ± 17326.831op/s 13369157.023op/s 13400952.704op/s 13430344.514op/s 13465166.017op/s 0.83% -0.473 1.246 0.27% 2547.419op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.892µs 3.911µs ± 0.003µs 3.911µs ± 0.001µs 3.913µs 3.916µs 3.918µs 3.934µs 0.59% 0.972 19.943 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254164844.340op/s 255657691.970op/s ± 205661.094op/s 255663657.411op/s ± 93542.687op/s 255759707.106op/s 255888920.238op/s 255952642.418op/s 256944846.392op/s 0.50% -0.922 19.834 0.08% 14542.435op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 71.377µs 72.069µs ± 0.177µs 72.065µs ± 0.106µs 72.178µs 72.315µs 72.468µs 72.748µs 0.95% -0.196 1.903 0.25% 0.013µs 1 200
credit_card/is_card_number/378282246310005 throughput 13746161.211op/s 13875759.168op/s ± 34189.224op/s 13876401.791op/s ± 20322.603op/s 13893897.815op/s 13932139.061op/s 13966685.925op/s 14010207.091op/s 0.96% 0.224 1.915 0.25% 2417.543op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.130µs 52.195µs ± 0.033µs 52.191µs ± 0.023µs 52.218µs 52.258µs 52.276µs 52.288µs 0.18% 0.433 -0.197 0.06% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19124984.162op/s 19158812.777op/s ± 12238.698op/s 19160345.748op/s ± 8600.486op/s 19167936.355op/s 19176359.577op/s 19182002.467op/s 19182773.869op/s 0.12% -0.430 -0.201 0.06% 865.407op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 5.697µs 5.890µs ± 0.072µs 5.895µs ± 0.050µs 5.943µs 5.997µs 6.028µs 6.037µs 2.42% -0.416 -0.340 1.23% 0.005µs 1 200
credit_card/is_card_number/x371413321323331 throughput 165646565.608op/s 169798593.632op/s ± 2100931.564op/s 169647038.479op/s ± 1436683.227op/s 171153195.849op/s 173459937.534op/s 175180292.566op/s 175538898.196op/s 3.47% 0.472 -0.277 1.23% 148558.296op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.890µs 3.910µs ± 0.003µs 3.910µs ± 0.002µs 3.912µs 3.914µs 3.917µs 3.920µs 0.24% -1.475 13.763 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 255126475.683op/s 255733082.437op/s ± 182504.333op/s 255744780.912op/s ± 101239.786op/s 255832182.113op/s 255944925.228op/s 255991769.044op/s 257077679.283op/s 0.52% 1.504 13.985 0.07% 12905.005op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.138µs 64.319µs ± 0.102µs 64.303µs ± 0.053µs 64.356µs 64.502µs 64.633µs 64.843µs 0.84% 1.881 5.475 0.16% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15421964.218op/s 15547526.376op/s ± 24630.711op/s 15551470.083op/s ± 12750.423op/s 15563879.351op/s 15576197.002op/s 15579368.647op/s 15591368.618op/s 0.26% -1.863 5.373 0.16% 1741.654op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.370µs 57.545µs ± 0.103µs 57.519µs ± 0.066µs 57.604µs 57.766µs 57.811µs 57.914µs 0.69% 0.939 0.667 0.18% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17266886.122op/s 17377791.581op/s ± 31049.996op/s 17385695.050op/s ± 19807.100op/s 17400185.312op/s 17416496.560op/s 17428539.129op/s 17430702.439op/s 0.26% -0.929 0.642 0.18% 2195.566op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.897µs 3.911µs ± 0.003µs 3.911µs ± 0.001µs 3.912µs 3.916µs 3.917µs 3.918µs 0.19% -0.270 4.327 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255223650.579op/s 255690133.979op/s ± 168324.533op/s 255709768.114op/s ± 90422.421op/s 255794503.302op/s 255899060.040op/s 255957943.665op/s 256637677.081op/s 0.36% 0.282 4.386 0.07% 11902.342op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.562µs 54.806µs ± 0.147µs 54.786µs ± 0.079µs 54.861µs 55.085µs 55.227µs 55.608µs 1.50% 1.516 4.146 0.27% 0.010µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17982886.188op/s 18246204.874op/s ± 48761.943op/s 18252963.086op/s ± 26226.118op/s 18280531.234op/s 18305758.259op/s 18312771.913op/s 18327746.375op/s 0.41% -1.485 3.965 0.27% 3447.990op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.112µs 52.181µs ± 0.035µs 52.175µs ± 0.019µs 52.197µs 52.250µs 52.298µs 52.329µs 0.30% 1.324 2.677 0.07% 0.002µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19109731.362op/s 19163916.792op/s ± 12829.633op/s 19166173.620op/s ± 7134.259op/s 19172289.332op/s 19180428.962op/s 19183255.052op/s 19189585.812op/s 0.12% -1.318 2.655 0.07% 907.192op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 5.691µs 5.880µs ± 0.076µs 5.884µs ± 0.056µs 5.936µs 5.994µs 6.031µs 6.039µs 2.62% -0.203 -0.694 1.28% 0.005µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 165601844.208op/s 170107163.330op/s ± 2196481.622op/s 169948707.001op/s ± 1631809.764op/s 171701035.349op/s 173700951.656op/s 174929582.070op/s 175725480.785op/s 3.40% 0.252 -0.663 1.29% 155314.705op/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.911µs; 3.911µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ throughput [255658266.111op/s; 255708255.430op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [80.514µs; 80.738µs] or [-0.139%; +0.139%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12387017.271op/s; 12421310.357op/s] or [-0.138%; +0.138%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [74.891µs; 74.947µs] or [-0.037%; +0.037%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13342909.100op/s; 13352894.800op/s] or [-0.037%; +0.037%] None None None
credit_card/is_card_number/37828224631 execution_time [3.911µs; 3.912µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255629189.321op/s; 255686194.620op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [72.044µs; 72.093µs] or [-0.034%; +0.034%] None None None
credit_card/is_card_number/378282246310005 throughput [13871020.871op/s; 13880497.466op/s] or [-0.034%; +0.034%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.191µs; 52.200µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19157116.611op/s; 19160508.943op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 execution_time [5.880µs; 5.900µs] or [-0.171%; +0.171%] None None None
credit_card/is_card_number/x371413321323331 throughput [169507424.723op/s; 170089762.541op/s] or [-0.171%; +0.171%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.910µs; 3.911µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255707789.091op/s; 255758375.782op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.305µs; 64.333µs] or [-0.022%; +0.022%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15544112.797op/s; 15550939.956op/s] or [-0.022%; +0.022%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [57.531µs; 57.559µs] or [-0.025%; +0.025%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17373488.350op/s; 17382094.812op/s] or [-0.025%; +0.025%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.911µs; 3.911µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255666805.817op/s; 255713462.140op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.786µs; 54.827µs] or [-0.037%; +0.037%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18239446.938op/s; 18252962.810op/s] or [-0.037%; +0.037%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.177µs; 52.186µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19162138.728op/s; 19165694.855op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [5.869µs; 5.890µs] or [-0.178%; +0.178%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [169802752.102op/s; 170411574.558op/s] or [-0.179%; +0.179%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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 5.030µs 5.119µs ± 0.053µs 5.113µs ± 0.033µs 5.127µs 5.227µs 5.231µs 5.237µs 2.43% 0.780 -0.329 1.04% 0.004µ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.111µs; 5.126µs] or [-0.144%; +0.144%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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 535.789µs 536.575µs ± 0.539µs 536.520µs ± 0.297µs 536.811µs 537.314µs 537.950µs 541.103µs 0.85% 3.614 25.107 0.10% 0.038µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1848076.381op/s 1863675.081op/s ± 1865.980op/s 1863863.825op/s ± 1032.707op/s 1864908.394op/s 1865591.373op/s 1866029.735op/s 1866404.931op/s 0.14% -3.572 24.643 0.10% 131.945op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 379.097µs 380.114µs ± 0.344µs 380.120µs ± 0.215µs 380.313µs 380.625µs 380.871µs 381.536µs 0.37% 0.301 1.330 0.09% 0.024µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2620985.846op/s 2630795.272op/s ± 2380.220op/s 2630745.477op/s ± 1489.206op/s 2632281.291op/s 2634736.215op/s 2636019.435op/s 2637849.726op/s 0.27% -0.292 1.312 0.09% 168.307op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 194.741µs 195.394µs ± 0.265µs 195.413µs ± 0.162µs 195.573µs 195.803µs 195.994µs 196.023µs 0.31% -0.214 -0.154 0.14% 0.019µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5101448.341op/s 5117879.376op/s ± 6938.919op/s 5117359.229op/s ± 4237.868op/s 5122224.879op/s 5130759.015op/s 5134091.950op/s 5135024.801op/s 0.35% 0.221 -0.153 0.14% 490.656op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.756µs 36.952µs ± 0.105µs 36.954µs ± 0.087µs 37.035µs 37.114µs 37.157µs 37.169µs 0.58% 0.040 -0.975 0.28% 0.007µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26904373.210op/s 27062527.996op/s ± 76636.094op/s 27060377.987op/s ± 64070.366op/s 27129113.629op/s 27184951.908op/s 27200554.929op/s 27206468.921op/s 0.54% -0.031 -0.977 0.28% 5418.990op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.927µs 46.117µs ± 0.205µs 46.092µs ± 0.036µs 46.133µs 46.204µs 46.326µs 48.444µs 5.10% 9.273 94.720 0.44% 0.015µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20642386.480op/s 21684462.544op/s ± 92673.211op/s 21695958.622op/s ± 17105.080op/s 21711037.193op/s 21727349.133op/s 21747390.594op/s 21773784.412op/s 0.36% -9.131 92.322 0.43% 6552.986op/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 [536.500µs; 536.649µs] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1863416.474op/s; 1863933.688op/s] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [380.066µs; 380.161µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2630465.397op/s; 2631125.148op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [195.357µs; 195.430µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5116917.709op/s; 5118841.043op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.937µs; 36.966µs] or [-0.039%; +0.039%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27051906.971op/s; 27073149.022op/s] or [-0.039%; +0.039%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.088µs; 46.145µs] or [-0.062%; +0.062%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21671618.929op/s; 21697306.160op/s] or [-0.059%; +0.059%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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.574µs 24.241µs ± 9.737µs 18.678µs ± 0.044µs 30.803µs 46.663µs 48.153µs 55.416µs 196.68% 1.438 0.614 40.07% 0.689µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [22.892µs; 25.591µs] or [-5.567%; +5.567%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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.220µs 3.240µs ± 1.452µs 2.991µs ± 0.035µs 3.029µs 3.688µs 14.350µs 14.957µs 400.04% 7.242 53.986 44.71% 0.103µ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.039µs; 3.441µs] or [-6.212%; +6.212%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0a96a8f 1753384368 ekump/clippy-annotation-action
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.491µs 33.984µs ± 0.726µs 33.689µs ± 0.098µs 33.785µs 35.497µs 35.554µs 37.171µs 10.33% 1.822 1.996 2.13% 0.051µ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.884µs; 34.085µs] or [-0.296%; +0.296%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented May 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.04%. Comparing base (740b396) to head (0a96a8f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1049      +/-   ##
==========================================
- Coverage   71.05%   71.04%   -0.01%     
==========================================
  Files         348      348              
  Lines       53839    53839              
==========================================
- Hits        38254    38250       -4     
- Misses      15585    15589       +4     
Components Coverage Δ
datadog-crashtracker 43.89% <ø> (-0.03%) ⬇️
datadog-crashtracker-ffi 5.93% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 86.84% <ø> (+0.01%) ⬆️
data-pipeline-ffi 88.36% <ø> (ø)
ddcommon 82.99% <ø> (ø)
ddcommon-ffi 70.01% <ø> (ø)
ddtelemetry 60.08% <ø> (ø)
ddtelemetry-ffi 21.32% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.58% <ø> (ø)
datadog-profiling 77.13% <ø> (ø)
datadog-profiling-ffi 62.12% <ø> (ø)
datadog-sidecar 39.10% <ø> (ø)
datdog-sidecar-ffi 11.55% <ø> (ø)
spawn-worker 55.35% <ø> (ø)
tinybytes 91.59% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
datadog-trace-protobuf 77.10% <ø> (ø)
datadog-trace-utils 89.94% <ø> (ø)
datadog-tracer-flare 75.14% <ø> (ø)
datadog-log 76.31% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@r1viollet
Copy link
Contributor

r1viollet commented May 2, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.26 MB 8.26 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 68.04 MB 68.04 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 21.15 MB 21.15 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 23.69 MB 23.69 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 74.96 MB 74.96 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 8.30 MB 8.30 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 16.70 MB 16.70 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 62.62 KB 62.62 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 112.67 MB 112.65 MB --.02% (-24.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 632.41 MB 632.41 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 4.98 MB 4.98 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 62.62 KB 62.62 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 15.85 MB 15.85 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 26.38 MB 26.38 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 14.15 MB 14.15 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 63.58 KB 63.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 114.56 MB 114.55 MB --.01% (-16.00 KB) 💪
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 624.68 MB 624.68 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 3.77 MB 3.77 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 63.58 KB 63.58 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 16.48 MB 16.48 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 24.30 MB 24.30 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 59.31 MB 59.31 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.69 MB 8.69 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 19.47 MB 19.47 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 70.65 MB 70.65 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 8.70 MB 8.70 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 21.77 MB 21.77 MB 0% (0 B) 👌

@ekump ekump force-pushed the ekump/clippy-annotation-action branch from 4dae85a to a1c1a9d Compare May 2, 2025 17:05
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@ekump ekump force-pushed the ekump/clippy-annotation-action branch from 4db63c3 to c0d22c4 Compare May 2, 2025 19:07
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
Copy link

github-actions bot commented May 2, 2025

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/ekump/clippy-annotation-action

Summary by Rule

Rule Base Branch PR Branch Change
unwrap_used 0 5 ⚠️ +5 (N/A)
Total 0 5 ⚠️ +5 (N/A)

Annotation Counts by File

File Base Branch PR Branch Change
.github/actions/clippy-annotation-reporter/src/analyzer/annotation.rs 0 5 ⚠️ +5 (N/A)

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 0 5 ⚠️ +5 (N/A)
data-pipeline 8 8 No change (0%)
datadog-crashtracker 4 4 No change (0%)
datadog-ddsketch 2 2 No change (0%)
datadog-ipc 27 27 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling 11 11 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 56 56 No change (0%)
datadog-trace-normalization 2 2 No change (0%)
datadog-trace-obfuscation 9 9 No change (0%)
datadog-trace-utils 19 19 No change (0%)
ddcommon 10 10 No change (0%)
ddcommon-ffi 8 8 No change (0%)
ddtelemetry 19 19 No change (0%)
dogstatsd-client 1 1 No change (0%)
tinybytes 3 3 No change (0%)
Total 202 207 ⚠️ +5 (+2.5%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@DataDog DataDog deleted a comment from github-actions bot May 2, 2025
@ekump ekump force-pushed the ekump/clippy-annotation-action branch 6 times, most recently from 196838e to 78c37d6 Compare May 8, 2025 13:02
@ekump ekump force-pushed the ekump/clippy-annotation-action branch from 92c3830 to 145fb3f Compare May 9, 2025 20:35
@ekump ekump force-pushed the ekump/clippy-annotation-action branch 4 times, most recently from f56f485 to 3242198 Compare June 1, 2025 02:23
@ekump ekump force-pushed the ekump/clippy-annotation-action branch 2 times, most recently from a0b7788 to 9a877f9 Compare June 1, 2025 02:53
@ekump ekump marked this pull request as ready for review June 1, 2025 03:06
@ekump ekump requested review from a team as code owners June 1, 2025 03:06
@ekump ekump changed the title wip: init commit of clippy annotation reporter clippy annotation reporter Jun 1, 2025
shell: bash
run: |
cd ${{ github.action_path }}
cargo build --release
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how this is usually done, but should we cache the binary as it probably won't change very often.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The build time relative to the rest of CI is very short. I don't think it's an issue in the short-term. Once we move this to a separate repo the action should be pre-built.


let rule_pattern = rules.join("|");
let regex = Regex::new(&format!(
r"#\s*\[\s*allow\s*\(\s*clippy\s*::\s*({})\s*\)\s*\]",
Copy link
Contributor

Choose a reason for hiding this comment

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

It could be useful to allow non-clippy lints for things like "missing_docs". WDYT ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

100% agree, the missing docs one would be quite useful. I think we can do it in a follow-up PR. There are probably a handful of features we'll want to add.

annotations: &[ClippyAnnotation],
) -> HashMap<Rc<String>, usize> {
let mut counts = HashMap::new();
let mut crate_cache: HashMap<String, Rc<String>> = HashMap::new();
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be to naive to assume all files in sub directory of the same cargo.toml are in the same crate (may be wrong in workspace though) ? Are at least cache based on directory. This could reduce the number of calls to get_crate_for_file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can have crates within crates, even when the parent isn't a workspace. And as you mentioned we'd need extra logic to handle the top level workspace cargo.

I think this implementation is a good starting point (at least for libdatadog), but we likely will want to evolve the logic for matching files to crates. Ideally, it would be nice if we could leverage cargo metadata more for this rather than file paths.

After compilation, the reporter takes just a couple of seconds to run for all of libdatadog (including time communicating with GitHub). I think we'd be ok adding better caching later.

Copy link
Contributor

@VianneyRuhlmann VianneyRuhlmann left a comment

Choose a reason for hiding this comment

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

LGTM

ekump added 5 commits July 24, 2025 15:12
This is not part of the libdatadog workspace. It's a github action that
will run for CI. It reports counts of clippy allow annotations for both
changed files in the PR and a repo overall. The goal is to call
attention to excessive usage of allows, which could be a signal of
reduced code quality. This action should be moved to its own repo when
confident of its functionality.
reviews the files in the repo to parse and count the allow annotations
usage. It also compares changed files to their base to determine the
diffs of counts.
combines env vars and CLI args to get relevant info about the PR being
analyzed.
finished report and comments it on the PR. it checks for existing
comments and updates them instead of repeatedly posting a new comment
for every PR change.
data from the analyzer and generates the text of the report that will be
posted on the PR.
@ekump ekump force-pushed the ekump/clippy-annotation-action branch from 9a877f9 to 0a96a8f Compare July 24, 2025 19:13
@datadog-datadog-prod-us1
Copy link

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 0a96a8f | Was this helpful? Give us feedback!

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.

4 participants