Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashtracking for Windows #892

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Conversation

kevingosse
Copy link
Contributor

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@pr-commenter
Copy link

pr-commenter bot commented Feb 20, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-02-27 14:15:50

Comparing candidate commit 0beb9a1 in PR branch kevin/crashtracking_windows with baseline commit a43896a in branch main.

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

scenario:credit_card/is_card_number/x371413321323331

  • 🟩 execution_time [-608.339ns; -590.485ns] or [-9.167%; -8.898%]
  • 🟩 throughput [+14743797.046op/s; +15150085.211op/s] or [+9.784%; +10.053%]

scenario:credit_card/is_card_number_no_luhn/x371413321323331

  • 🟩 execution_time [-599.383ns; -583.572ns] or [-9.041%; -8.803%]
  • 🟩 throughput [+14584966.954op/s; +14944782.656op/s] or [+9.669%; +9.907%]

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 0beb9a1 1740664975 kevin/crashtracking_windows
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 17.585µs 25.511µs ± 10.574µs 17.951µs ± 0.144µs 34.524µs 44.011µs 54.431µs 89.951µs 401.10% 1.722 5.719 41.34% 0.748µ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.045µs; 26.976µs] or [-5.744%; +5.744%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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.003µs 5.092µs ± 0.047µs 5.103µs ± 0.046µs 5.129µs 5.165µs 5.168µs 5.169µs 1.28% -0.139 -1.165 0.92% 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.086µs; 5.099µs] or [-0.128%; +0.128%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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 208.610µs 209.115µs ± 0.478µs 209.067µs ± 0.120µs 209.187µs 209.388µs 209.606µs 213.746µs 2.24% 8.029 72.317 0.23% 0.034µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4678460.459op/s 4782084.334op/s ± 10732.034op/s 4783152.779op/s ± 2753.056op/s 4785821.686op/s 4788728.515op/s 4791181.850op/s 4793644.905op/s 0.22% -7.962 71.478 0.22% 758.869op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.253µs 18.344µs ± 0.057µs 18.358µs ± 0.038µs 18.383µs 18.422µs 18.440µs 18.599µs 1.31% 0.242 0.799 0.31% 0.004µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 53767036.018op/s 54514455.029op/s ± 168107.465op/s 54473386.549op/s ± 114041.126op/s 54654646.932op/s 54771455.630op/s 54779681.920op/s 54784051.856op/s 0.57% -0.217 0.702 0.31% 11886.993op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.713µs 10.779µs ± 0.024µs 10.778µs ± 0.017µs 10.797µs 10.813µs 10.827µs 10.832µs 0.50% -0.280 -0.284 0.22% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 92320234.749op/s 92772648.554op/s ± 202528.840op/s 92778943.507op/s ± 146499.551op/s 92902449.407op/s 93146746.176op/s 93251629.919op/s 93345473.032op/s 0.61% 0.291 -0.275 0.22% 14320.952op/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 [209.049µs; 209.181µs] or [-0.032%; +0.032%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4780596.977op/s; 4783571.691op/s] or [-0.031%; +0.031%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.336µs; 18.352µs] or [-0.043%; +0.043%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [54491156.952op/s; 54537753.107op/s] or [-0.043%; +0.043%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.776µs; 10.782µs] or [-0.030%; +0.030%] None None None
normalization/normalize_name/normalize_name/good throughput [92744580.004op/s; 92800717.103op/s] or [-0.030%; +0.030%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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 53.444ms 53.699ms ± 0.167ms 53.660ms ± 0.063ms 53.735ms 54.014ms 54.424ms 54.690ms 1.92% 2.728 10.203 0.31% 0.012ms 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 [53.676ms; 53.722ms] or [-0.043%; +0.043%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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 244.971ns 251.982ns ± 11.015ns 247.457ns ± 1.498ns 251.751ns 282.230ns 291.914ns 296.056ns 19.64% 2.413 4.988 4.36% 0.779ns 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.456ns; 253.509ns] or [-0.606%; +0.606%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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.467µs 150.048µs ± 0.369µs 149.988µs ± 0.146µs 150.142µs 150.570µs 151.321µs 153.109µs 2.08% 3.805 24.760 0.25% 0.026µ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 [149.997µs; 150.100µs] or [-0.034%; +0.034%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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 5.944ms 5.957ms ± 0.010ms 5.956ms ± 0.003ms 5.959ms 5.965ms 6.008ms 6.057ms 1.70% 6.852 60.771 0.16% 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 [5.956ms; 5.958ms] or [-0.023%; +0.023%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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 65.652µs 65.919µs ± 0.272µs 65.897µs ± 0.047µs 65.944µs 66.034µs 66.429µs 69.484µs 5.44% 11.385 145.872 0.41% 0.019µ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 [65.882µs; 65.957µs] or [-0.057%; +0.057%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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.204µs 3.184µs ± 1.524µs 2.985µs ± 0.026µs 3.008µs 3.623µs 13.847µs 17.360µs 481.67% 7.686 60.794 47.74% 0.108µ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.973µs; 3.395µs] or [-6.633%; +6.633%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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 504.762µs 505.760µs ± 0.575µs 505.726µs ± 0.272µs 506.010µs 506.400µs 506.678µs 511.610µs 1.16% 5.215 51.889 0.11% 0.041µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1954612.168op/s 1977224.395op/s ± 2233.795op/s 1977355.653op/s ± 1064.836op/s 1978387.926op/s 1979963.419op/s 1980964.477op/s 1981131.920op/s 0.19% -5.125 50.716 0.11% 157.953op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 452.473µs 453.350µs ± 0.611µs 453.343µs ± 0.240µs 453.531µs 453.896µs 454.520µs 460.137µs 1.50% 6.953 74.392 0.13% 0.043µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2173263.427op/s 2205806.381op/s ± 2946.737op/s 2205835.073op/s ± 1168.013op/s 2207205.561op/s 2208882.450op/s 2209483.070op/s 2210074.670op/s 0.19% -6.841 72.737 0.13% 208.366op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 175.150µs 176.305µs ± 0.324µs 176.329µs ± 0.224µs 176.557µs 176.748µs 176.877µs 176.984µs 0.37% -0.539 0.198 0.18% 0.023µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5650231.384op/s 5672019.813op/s ± 10428.229op/s 5671232.171op/s ± 7209.720op/s 5678209.105op/s 5691725.344op/s 5697582.554op/s 5709397.515op/s 0.67% 0.550 0.218 0.18% 737.387op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.572µs 37.685µs ± 0.051µs 37.680µs ± 0.035µs 37.720µs 37.769µs 37.806µs 37.820µs 0.37% 0.185 -0.328 0.13% 0.004µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26441121.848op/s 26535720.326op/s ± 35840.557op/s 26538934.161op/s ± 24521.692op/s 26559991.243op/s 26594709.429op/s 26608619.654op/s 26615832.490op/s 0.29% -0.178 -0.332 0.13% 2534.310op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 48.213µs 48.329µs ± 0.135µs 48.316µs ± 0.026µs 48.345µs 48.393µs 48.448µs 50.134µs 3.76% 12.024 158.037 0.28% 0.010µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 19946479.968op/s 20691818.878op/s ± 55985.368op/s 20697277.156op/s ± 11006.435op/s 20707326.995op/s 20720945.761op/s 20730426.202op/s 20741205.847op/s 0.21% -11.893 155.697 0.27% 3958.763op/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 [505.680µs; 505.840µs] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1976914.812op/s; 1977533.977op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [453.265µs; 453.434µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2205397.991op/s; 2206214.770op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [176.260µs; 176.350µs] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5670574.560op/s; 5673465.065op/s] or [-0.025%; +0.025%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.678µs; 37.692µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26530753.170op/s; 26540687.483op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [48.310µs; 48.347µs] or [-0.039%; +0.039%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20684059.844op/s; 20699577.911op/s] or [-0.037%; +0.037%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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.344µs 2.405µs ± 0.016µs 2.407µs ± 0.008µs 2.413µs 2.430µs 2.436µs 2.448µs 1.70% -1.133 3.088 0.65% 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.403µs; 2.407µs] or [-0.090%; +0.090%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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.913µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.918µs 3.919µs 3.921µs 0.18% -1.110 4.796 0.08% 0.000µs 1 200
credit_card/is_card_number/ throughput 255059605.214op/s 255549344.192op/s ± 197980.868op/s 255526267.904op/s ± 109886.734op/s 255665098.766op/s 255863836.591op/s 255941471.455op/s 256710890.708op/s 0.46% 1.123 4.874 0.08% 13999.361op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 81.237µs 82.598µs ± 0.731µs 82.538µs ± 0.498µs 83.037µs 83.676µs 83.901µs 87.753µs 6.32% 1.816 10.731 0.88% 0.052µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 11395570.710op/s 12107830.986op/s ± 105531.907op/s 12115569.626op/s ± 73533.354op/s 12188761.990op/s 12249297.614op/s 12298146.196op/s 12309684.210op/s 1.60% -1.584 8.762 0.87% 7462.233op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 77.986µs 79.548µs ± 0.536µs 79.542µs ± 0.255µs 79.827µs 80.176µs 80.359µs 84.175µs 5.83% 2.912 26.252 0.67% 0.038µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 11879999.656op/s 12571522.069op/s ± 83254.775op/s 12572019.360op/s ± 40235.366op/s 12610747.438op/s 12699560.977op/s 12733330.897op/s 12822816.941op/s 1.99% -2.534 22.486 0.66% 5887.002op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.897µs 3.914µs ± 0.003µs 3.914µs ± 0.002µs 3.915µs 3.918µs 3.921µs 3.927µs 0.34% -0.083 5.484 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254648861.039op/s 255507657.041op/s ± 203000.003op/s 255504339.179op/s ± 109442.567op/s 255628866.891op/s 255802627.698op/s 255929477.213op/s 256599712.480op/s 0.43% 0.101 5.516 0.08% 14354.268op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 74.886µs 76.237µs ± 0.389µs 76.214µs ± 0.270µs 76.508µs 76.841µs 77.118µs 77.183µs 1.27% -0.102 0.296 0.51% 0.028µs 1 200
credit_card/is_card_number/378282246310005 throughput 12956247.635op/s 13117386.648op/s ± 66969.570op/s 13120998.476op/s ± 46544.479op/s 13159105.451op/s 13220426.295op/s 13248114.551op/s 13353574.114op/s 1.77% 0.137 0.346 0.51% 4735.464op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 51.354µs 51.444µs ± 0.030µs 51.442µs ± 0.016µs 51.459µs 51.495µs 51.510µs 51.557µs 0.22% 0.246 1.294 0.06% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19395825.024op/s 19438593.775op/s ± 11295.173op/s 19439239.741op/s ± 6109.107op/s 19445153.971op/s 19453986.273op/s 19468289.972op/s 19472788.725op/s 0.17% -0.241 1.290 0.06% 798.689op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.027µs 6.037µs ± 0.004µs 6.037µs ± 0.002µs 6.039µs 6.045µs 6.048µs 6.051µs 0.23% 0.365 0.359 0.07% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 165259169.489op/s 165642866.569op/s ± 115778.594op/s 165641037.567op/s ± 66548.089op/s 165713422.569op/s 165829131.116op/s 165871343.125op/s 165909155.120op/s 0.16% -0.360 0.353 0.07% 8186.783op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.891µs 3.914µs ± 0.003µs 3.914µs ± 0.002µs 3.915µs 3.919µs 3.920µs 3.922µs 0.21% -1.695 11.714 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254988410.298op/s 255524623.023op/s ± 206067.224op/s 255518502.378op/s ± 107960.955op/s 255627633.351op/s 255832888.517op/s 255905829.375op/s 256999180.639op/s 0.58% 1.722 11.927 0.08% 14571.153op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 65.833µs 66.165µs ± 0.221µs 66.130µs ± 0.095µs 66.240µs 66.472µs 66.942µs 67.794µs 2.52% 2.981 16.135 0.33% 0.016µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 14750567.897op/s 15113964.695op/s ± 49941.947op/s 15121817.002op/s ± 21788.254op/s 15141724.182op/s 15171331.048op/s 15180597.145op/s 15189957.969op/s 0.45% -2.890 15.301 0.33% 3531.429op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 59.419µs 59.675µs ± 0.097µs 59.676µs ± 0.065µs 59.743µs 59.826µs 59.894µs 59.940µs 0.44% -0.173 -0.004 0.16% 0.007µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 16683232.388op/s 16757568.820op/s ± 27303.702op/s 16757042.484op/s ± 18219.038op/s 16775073.499op/s 16805040.925op/s 16823425.868op/s 16829606.644op/s 0.43% 0.182 -0.001 0.16% 1930.663op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.896µs 3.914µs ± 0.003µs 3.914µs ± 0.001µs 3.915µs 3.918µs 3.920µs 3.924µs 0.26% -0.939 7.163 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254850027.340op/s 255523003.376op/s ± 186698.920op/s 255512767.943op/s ± 92695.859op/s 255611406.660op/s 255817832.732op/s 255918637.810op/s 256674490.753op/s 0.45% 0.957 7.253 0.07% 13201.607op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 56.395µs 56.877µs ± 0.172µs 56.893µs ± 0.112µs 56.995µs 57.149µs 57.188µs 57.244µs 0.62% -0.294 -0.364 0.30% 0.012µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17469183.764op/s 17581829.658op/s ± 53093.544op/s 17576710.858op/s ± 34651.119op/s 17613460.666op/s 17675259.607op/s 17703618.794op/s 17731973.761op/s 0.88% 0.308 -0.352 0.30% 3754.281op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 51.355µs 51.440µs ± 0.036µs 51.441µs ± 0.023µs 51.462µs 51.499µs 51.517µs 51.563µs 0.24% -0.049 0.242 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19393689.612op/s 19440308.146op/s ± 13615.296op/s 19439601.159op/s ± 8614.175op/s 19448905.295op/s 19464955.494op/s 19470752.633op/s 19472147.041op/s 0.17% 0.053 0.239 0.07% 962.747op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.028µs 6.038µs ± 0.005µs 6.038µs ± 0.002µs 6.040µs 6.046µs 6.053µs 6.058µs 0.34% 0.925 2.874 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 165057710.929op/s 165614794.994op/s ± 132011.694op/s 165617133.474op/s ± 58793.463op/s 165673773.842op/s 165825527.437op/s 165863228.325op/s 165890409.011op/s 0.17% -0.915 2.842 0.08% 9334.636op/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.913µs; 3.914µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ throughput [255521905.948op/s; 255576782.436op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [82.496µs; 82.699µs] or [-0.123%; +0.123%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12093205.279op/s; 12122456.693op/s] or [-0.121%; +0.121%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [79.474µs; 79.623µs] or [-0.093%; +0.093%] None None None
credit_card/is_card_number/ 378282246310005 throughput [12559983.758op/s; 12583060.380op/s] or [-0.092%; +0.092%] None None None
credit_card/is_card_number/37828224631 execution_time [3.913µs; 3.914µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255479523.193op/s; 255535790.889op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [76.183µs; 76.291µs] or [-0.071%; +0.071%] None None None
credit_card/is_card_number/378282246310005 throughput [13108105.310op/s; 13126667.987op/s] or [-0.071%; +0.071%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [51.440µs; 51.448µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19437028.373op/s; 19440159.177op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.037µs; 6.038µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/x371413321323331 throughput [165626820.770op/s; 165658912.369op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.913µs; 3.914µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ throughput [255496064.088op/s; 255553181.959op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [66.134µs; 66.195µs] or [-0.046%; +0.046%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15107043.222op/s; 15120886.169op/s] or [-0.046%; +0.046%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [59.661µs; 59.688µs] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [16753784.790op/s; 16761352.850op/s] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.913µs; 3.914µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255497128.701op/s; 255548878.050op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [56.854µs; 56.901µs] or [-0.042%; +0.042%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [17574471.404op/s; 17589187.913op/s] or [-0.042%; +0.042%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [51.435µs; 51.445µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19438421.197op/s; 19442195.095op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.037µs; 6.039µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165596499.443op/s; 165633090.545op/s] or [-0.011%; +0.011%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 0beb9a1 1740664975 kevin/crashtracking_windows
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.337µs 33.931µs ± 1.005µs 33.470µs ± 0.085µs 33.626µs 36.085µs 36.127µs 37.130µs 10.93% 1.709 1.045 2.95% 0.071µ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.792µs; 34.071µs] or [-0.410%; +0.410%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.79%. Comparing base (1f16a44) to head (0beb9a1).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #892      +/-   ##
==========================================
+ Coverage   71.77%   71.79%   +0.02%     
==========================================
  Files         328      328              
  Lines       48577    48702     +125     
==========================================
+ Hits        34866    34967     +101     
- Misses      13711    13735      +24     
Components Coverage Δ
crashtracker 42.90% <ø> (+0.02%) ⬆️
crashtracker-ffi 6.25% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 92.21% <ø> (+0.13%) ⬆️
data-pipeline-ffi 90.39% <ø> (ø)
ddcommon 80.08% <ø> (ø)
ddcommon-ffi 61.05% <ø> (ø)
ddtelemetry 61.74% <ø> (ø)
ddtelemetry-ffi 22.46% <ø> (ø)
dogstatsd 90.16% <ø> (ø)
dogstatsd-client 82.57% <ø> (ø)
ipc 82.73% <ø> (+0.05%) ⬆️
profiling 80.04% <ø> (ø)
profiling-ffi 70.68% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 40.23% <ø> (-0.63%) ⬇️
sidecar-ffi 0.14% <ø> (-4.56%) ⬇️
spawn-worker 54.37% <ø> (ø)
tinybytes 92.00% <ø> (-0.86%) ⬇️
trace-mini-agent 72.48% <ø> (ø)
trace-normalization 98.23% <ø> (ø)
trace-obfuscation 95.96% <ø> (ø)
trace-protobuf 78.13% <ø> (ø)
trace-utils 93.29% <ø> (-0.02%) ⬇️

use std::ptr::{addr_of, read_unaligned};
use windows::core::{w, HRESULT, PCWSTR};
use windows::Win32::Foundation::{BOOL, ERROR_SUCCESS, E_FAIL, HANDLE, HMODULE, S_OK, TRUE};
#[cfg(target_arch = "x86_64")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to consider ARM?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the future maybe, but for now ARM on Windows Server is not a thing (only the desktop version of Windows runs on ARM)

let mut path = env::temp_dir().join(process_name);
path.set_extension("dll");

// Attempt to move it just in case it already exists
Copy link
Contributor

Choose a reason for hiding this comment

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

How would this happen?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we log something here? Is this unexpected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reused the logic from the trampoline (since the need is the same): https://github.com/DataDog/libdatadog/blob/main/spawn_worker/src/win32.rs#L48

The filename is made of the user SID and the version number, so if multiple instances of PHP are running they will share the same file. I think this is a good thing for crashtracking because we need to add the path to the registry, and I'm afraid we would add a lot of garbage if the path was random.

.file("src/crashtracking_trampoline.cpp") // Path to your C++ file
.warnings(true)
.warnings_into_errors(true)
.flag("/std:c++17") // Set the C++ standard (adjust as needed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does having a C++ binary increase the size of libdatadog vs C?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably but the size is still reasonable. The only reason I used C++ is because it has regex support in the stdlib. The DLL size is 160 KB, I believe it's acceptable (it was ~60 KB in C with manual parsing).


if (!EnumProcessModules(process, nullptr, 0, &cbNeeded))
{
OutputDebugStringW(L"Failed to enumerate process modules (1st)");
Copy link
Contributor

Choose a reason for hiding this comment

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

What does 1st vs 2nd mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We call EnumProcessModules twice (first to get the number of modules, then to populate them). It's simply to know if we failed in the first or the second call.

fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"{:08x}{:04x}{:04x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this documented somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is standard guid formatting on Windows, but without the dashes: https://devblogs.microsoft.com/oldnewthing/20220928-00/?p=107221

Comment on lines +651 to +657
let debug_data_dir: IMAGE_DATA_DIRECTORY = if is_pe32 {
let nt_headers32: IMAGE_NT_HEADERS32 = read_memory(process_handle, nt_headers_address)?;
nt_headers32.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG.0 as usize]
} else {
let nt_headers64: IMAGE_NT_HEADERS64 = read_memory(process_handle, nt_headers_address)?;
nt_headers64.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_DEBUG.0 as usize]
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there documentation for why this is the case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think there is a good official documentation about the PE format. It's mostly the definitions in the official headers (https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-image_nt_headers64) and then a bunch of third-party articles: https://learn.microsoft.com/en-us/archive/msdn-magazine/2002/february/inside-windows-win32-portable-executable-file-format-in-detail https://wiki.osdev.org/PE

For the Rust implementation, I simply converted the C++ code we wrote for crashtracking in .net: https://github.com/DataDog/dd-trace-dotnet/blob/master/profiler/src/ProfilerEngine/Datadog.Profiler.Native.Windows/CrashReportingWindows.cpp#L271
which has proper testing: https://github.com/DataDog/dd-trace-dotnet/blob/master/profiler/test/Datadog.Profiler.Native.Tests/CrashReportingTest.cpp

We probably want to add similar testing in the libdatadog repository.

Comment on lines +726 to +728
if thread_entry.th32OwnerProcessID == pid {
thread_ids.push(thread_entry.th32ThreadID);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We loop over every thread on the machine? Could that be expensive?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes and yes. But as crazy as it sounds, this is the normal way.

In "recent" versions of windows (since 2012 R2) there is an alternative way that doesn't require to enumerate all threads (using something called "process snapshotting", which can be thought as Windows' sane version of vfork). However we would need to confirm that it works correctly in the context of WER, so that requires additional research. Our implementation of crashtracking in .NET uses CreateToolhelp32Snapshot, so I'd rather rely on this battle-tested solution for now.

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.

3 participants