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

Fix the trace payload size hint #664

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Fix the trace payload size hint #664

merged 2 commits into from
Oct 3, 2024

Conversation

bwoebi
Copy link
Contributor

@bwoebi bwoebi commented Oct 3, 2024

The incoming buffer may be much larger than the actual contained data. The decoder knows where the payload starts and ends, but the sidecar send_trace_v04 method does not.

This ensures proper trace coalescing, leading to less individual http requests.

The incoming buffer may be much larger than the actual contained data. The decoder knows where the payload starts and ends, but the sidecar send_trace_v04 method does not.

This ensures proper trace coalescing, leading to less individual http requests.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@pr-commenter
Copy link

pr-commenter bot commented Oct 3, 2024

Benchmarks

Comparison

Benchmark execution time: 2024-10-03 17:32:10

Comparing candidate commit ce20078 in PR branch bob/fix-payload-size with baseline commit d01cf11 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 51 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 ce20078 1727976099 bob/fix-payload-size
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 1.132µs 1.184µs ± 0.020µs 1.187µs ± 0.015µs 1.202µs 1.206µs 1.208µs 1.208µs 1.80% -0.833 -0.107 1.71% 0.001µs 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 [1.181µs; 1.186µs] or [-0.238%; +0.238%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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.719µs 2.744µs ± 0.027µs 2.736µs ± 0.009µs 2.746µs 2.819µs 2.826µs 2.828µs 3.36% 1.950 2.975 0.98% 0.002µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.740µs; 2.748µs] or [-0.136%; +0.136%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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.806µs 22.994µs ± 9.873µs 18.267µs ± 0.129µs 18.968µs 37.264µs 43.253µs 96.603µs 428.85% 3.273 17.086 42.83% 0.698µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [21.625µs; 24.362µs] or [-5.951%; +5.951%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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 270.524µs 271.620µs ± 0.456µs 271.618µs ± 0.303µs 271.890µs 272.436µs 272.945µs 273.093µs 0.54% 0.379 0.406 0.17% 0.032µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 3661749.994op/s 3681626.843op/s ± 6181.771op/s 3681645.647op/s ± 4105.107op/s 3686011.191op/s 3690781.776op/s 3694149.836op/s 3696529.698op/s 0.40% -0.368 0.390 0.17% 437.117op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 26.540µs 26.589µs ± 0.046µs 26.572µs ± 0.023µs 26.616µs 26.664µs 26.734µs 26.801µs 0.86% 1.389 2.194 0.17% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 37312491.773op/s 37609513.195op/s ± 65030.284op/s 37633146.858op/s ± 32444.423op/s 37659871.385op/s 37673667.103op/s 37675395.580op/s 37678383.597op/s 0.12% -1.377 2.133 0.17% 4598.335op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 16.079µs 16.106µs ± 0.028µs 16.089µs ± 0.007µs 16.125µs 16.133µs 16.170µs 16.344µs 1.58% 3.399 25.327 0.17% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 61184285.044op/s 62088160.078op/s ± 106206.305op/s 62153867.808op/s ± 27516.837op/s 62166633.036op/s 62179631.972op/s 62187088.771op/s 62192379.018op/s 0.06% -3.319 24.400 0.17% 7509.920op/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 [271.557µs; 271.683µs] or [-0.023%; +0.023%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [3680770.109op/s; 3682483.577op/s] or [-0.023%; +0.023%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [26.583µs; 26.595µs] or [-0.024%; +0.024%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [37600500.623op/s; 37618525.767op/s] or [-0.024%; +0.024%] None None None
normalization/normalize_name/normalize_name/good execution_time [16.102µs; 16.110µs] or [-0.024%; +0.024%] None None None
normalization/normalize_name/normalize_name/good throughput [62073440.906op/s; 62102879.251op/s] or [-0.024%; +0.024%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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 138.346µs 139.419µs ± 0.622µs 139.359µs ± 0.237µs 139.606µs 140.173µs 141.544µs 145.402µs 4.34% 5.074 43.223 0.44% 0.044µ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 [139.332µs; 139.505µs] or [-0.062%; +0.062%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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 293.329ns 304.954ns ± 15.767ns 296.525ns ± 2.390ns 311.787ns 339.308ns 349.848ns 353.126ns 19.09% 1.461 0.966 5.16% 1.115ns 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 [302.769ns; 307.139ns] or [-0.717%; +0.717%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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.922ms 8.964ms ± 0.047ms 8.959ms ± 0.008ms 8.967ms 8.984ms 9.285ms 9.399ms 4.91% 7.144 55.792 0.52% 0.003ms 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.957ms; 8.970ms] or [-0.073%; +0.073%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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.497µs 3.214µs ± 1.605µs 3.050µs ± 0.034µs 3.083µs 3.184µs 13.860µs 18.809µs 516.70% 8.068 66.460 49.81% 0.113µ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.991µs; 3.436µs] or [-6.920%; +6.920%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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 38.004µs 38.474µs ± 0.872µs 38.089µs ± 0.047µs 38.263µs 39.984µs 40.106µs 44.773µs 17.55% 2.987 13.429 2.26% 0.062µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [38.353µs; 38.595µs] or [-0.314%; +0.314%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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 506.225µs 507.233µs ± 0.658µs 507.096µs ± 0.325µs 507.511µs 508.295µs 508.771µs 512.261µs 1.02% 2.687 15.963 0.13% 0.046µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1952129.871op/s 1971482.880op/s ± 2546.792op/s 1972015.134op/s ± 1261.466op/s 1973056.578op/s 1974474.631op/s 1975027.217op/s 1975407.800op/s 0.17% -2.646 15.547 0.13% 180.085op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 468.251µs 468.818µs ± 0.269µs 468.796µs ± 0.176µs 468.982µs 469.287µs 469.528µs 469.628µs 0.18% 0.450 0.041 0.06% 0.019µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2129343.497op/s 2133026.869op/s ± 1223.749op/s 2133124.961op/s ± 802.875op/s 2133844.917op/s 2134808.746op/s 2135441.988op/s 2135605.558op/s 0.12% -0.447 0.036 0.06% 86.532op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 180.485µs 180.829µs ± 0.171µs 180.822µs ± 0.122µs 180.939µs 181.151µs 181.207µs 181.319µs 0.28% 0.334 -0.404 0.09% 0.012µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5515129.952op/s 5530084.894op/s ± 5233.303op/s 5530307.230op/s ± 3737.165op/s 5534056.347op/s 5537590.764op/s 5539422.768op/s 5540616.911op/s 0.19% -0.329 -0.409 0.09% 370.050op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 43.891µs 44.229µs ± 0.145µs 44.193µs ± 0.057µs 44.259µs 44.554µs 44.596µs 44.826µs 1.43% 1.299 1.927 0.33% 0.010µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 22308700.939op/s 22609871.684op/s ± 73909.488op/s 22627883.794op/s ± 28938.737op/s 22653224.914op/s 22682976.644op/s 22761837.495op/s 22783521.810op/s 0.69% -1.277 1.878 0.33% 5226.190op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 48.993µs 49.126µs ± 0.047µs 49.127µs ± 0.027µs 49.154µs 49.200µs 49.222µs 49.275µs 0.30% -0.070 0.112 0.10% 0.003µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20294396.174op/s 20355745.639op/s ± 19488.087op/s 20355289.748op/s ± 11352.439op/s 20366618.071op/s 20386793.175op/s 20402251.459op/s 20410953.182op/s 0.27% 0.076 0.111 0.10% 1378.016op/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 [507.142µs; 507.324µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1971129.919op/s; 1971835.841op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [468.780µs; 468.855µs] or [-0.008%; +0.008%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2132857.269op/s; 2133196.469op/s] or [-0.008%; +0.008%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [180.805µs; 180.853µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5529359.608op/s; 5530810.179op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [44.209µs; 44.249µs] or [-0.045%; +0.045%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [22599628.540op/s; 22620114.829op/s] or [-0.045%; +0.045%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [49.120µs; 49.133µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20353044.778op/s; 20358446.501op/s] or [-0.013%; +0.013%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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 75.412µs 75.648µs ± 0.173µs 75.630µs ± 0.054µs 75.686µs 75.768µs 76.053µs 77.693µs 2.73% 8.592 96.795 0.23% 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 [75.624µs; 75.672µs] or [-0.032%; +0.032%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz ce20078 1727976099 bob/fix-payload-size
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 2.013µs 2.014µs ± 0.003µs 2.014µs ± 0.000µs 2.015µs 2.016µs 2.017µs 2.050µs 1.78% 12.479 166.152 0.13% 0.000µs 1 200
credit_card/is_card_number/ throughput 487811444.027op/s 496434048.518op/s ± 638245.364op/s 496509930.203op/s ± 112709.247op/s 496618294.478op/s 496681298.608op/s 496709836.074op/s 496753244.804op/s 0.05% -12.430 165.260 0.13% 45130.763op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 123.997µs 125.830µs ± 0.586µs 125.808µs ± 0.362µs 126.200µs 126.770µs 127.223µs 127.623µs 1.44% -0.001 0.414 0.46% 0.041µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 7835575.157op/s 7947371.216op/s ± 36991.926op/s 7948609.063op/s ± 22787.615op/s 7970669.729op/s 8005118.885op/s 8039523.179op/s 8064685.227op/s 1.46% 0.035 0.423 0.46% 2615.724op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 115.508µs 116.869µs ± 0.549µs 116.888µs ± 0.364µs 117.234µs 117.689µs 117.993µs 118.778µs 1.62% -0.024 -0.029 0.47% 0.039µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 8419051.020op/s 8556804.339op/s ± 40213.095op/s 8555166.225op/s ± 26675.257op/s 8583263.931op/s 8623987.287op/s 8642036.492op/s 8657409.011op/s 1.20% 0.052 -0.055 0.47% 2843.495op/s 1 200
credit_card/is_card_number/37828224631 execution_time 2.013µs 2.014µs ± 0.002µs 2.014µs ± 0.001µs 2.015µs 2.016µs 2.017µs 2.039µs 1.23% 10.087 123.146 0.10% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 490443416.165op/s 496405188.947op/s ± 475558.863op/s 496466339.595op/s ± 135240.259op/s 496602511.174op/s 496663464.363op/s 496707708.766op/s 496739279.311op/s 0.05% -10.020 121.975 0.10% 33627.090op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 110.442µs 112.910µs ± 0.719µs 112.994µs ± 0.404µs 113.339µs 114.014µs 114.288µs 114.637µs 1.45% -0.671 0.839 0.64% 0.051µs 1 200
credit_card/is_card_number/378282246310005 throughput 8723164.874op/s 8856939.565op/s ± 56638.309op/s 8850048.117op/s ± 31630.345op/s 8889452.888op/s 8967137.925op/s 9013859.525op/s 9054491.353op/s 2.31% 0.716 0.922 0.64% 4004.933op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 112.315µs 113.333µs ± 0.315µs 113.290µs ± 0.189µs 113.495µs 113.885µs 114.046µs 114.878µs 1.40% 0.650 2.725 0.28% 0.022µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 8704858.827op/s 8823603.163op/s ± 24499.223op/s 8826898.723op/s ± 14713.718op/s 8839817.200op/s 8849554.066op/s 8881779.527op/s 8903528.468op/s 0.87% -0.615 2.636 0.28% 1732.357op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 23.251µs 24.006µs ± 0.360µs 23.972µs ± 0.256µs 24.226µs 24.615µs 24.799µs 24.915µs 3.93% 0.295 -0.595 1.49% 0.025µs 1 200
credit_card/is_card_number/x371413321323331 throughput 40135681.872op/s 41665172.991op/s ± 621797.808op/s 41715002.627op/s ± 449936.886op/s 42164230.937op/s 42633845.683op/s 42831701.996op/s 43008330.942op/s 3.10% -0.236 -0.628 1.49% 43967.745op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 2.013µs 2.014µs ± 0.001µs 2.014µs ± 0.000µs 2.015µs 2.016µs 2.017µs 2.018µs 0.17% 1.326 2.065 0.04% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 495640806.662op/s 496462964.708op/s ± 187300.314op/s 496493818.654op/s ± 112852.459op/s 496609850.103op/s 496660376.602op/s 496680013.730op/s 496729489.024op/s 0.05% -1.324 2.053 0.04% 13244.132op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 97.448µs 98.499µs ± 0.450µs 98.452µs ± 0.308µs 98.804µs 99.361µs 99.544µs 99.751µs 1.32% 0.410 -0.177 0.46% 0.032µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 10024923.729op/s 10152648.563op/s ± 46281.498op/s 10157248.653op/s ± 31661.089op/s 10184095.258op/s 10220446.771op/s 10234927.485op/s 10261871.904op/s 1.03% -0.387 -0.204 0.45% 3272.596op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 89.125µs 90.509µs ± 0.612µs 90.514µs ± 0.440µs 90.868µs 91.492µs 92.114µs 92.567µs 2.27% 0.253 0.205 0.67% 0.043µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 10803042.176op/s 11049148.452op/s ± 74632.008op/s 11047982.511op/s ± 53713.152op/s 11103518.380op/s 11175521.742op/s 11205106.748op/s 11220187.198op/s 1.56% -0.210 0.149 0.67% 5277.280op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 2.013µs 2.014µs ± 0.003µs 2.014µs ± 0.001µs 2.015µs 2.016µs 2.017µs 2.049µs 1.74% 12.307 163.060 0.13% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 488009560.859op/s 496424628.555op/s ± 625836.535op/s 496486396.291op/s ± 127924.327op/s 496615338.914op/s 496683686.044op/s 496716962.003op/s 496737838.077op/s 0.05% -12.255 162.110 0.13% 44253.326op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 85.402µs 86.524µs ± 0.497µs 86.521µs ± 0.356µs 86.882µs 87.362µs 87.594µs 87.926µs 1.62% 0.087 -0.478 0.57% 0.035µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 11373223.608op/s 11557830.797op/s ± 66300.360op/s 11557846.803op/s ± 47540.924op/s 11603058.857op/s 11672113.657op/s 11688491.956op/s 11709370.201op/s 1.31% -0.061 -0.489 0.57% 4688.143op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 112.535µs 113.507µs ± 0.352µs 113.482µs ± 0.265µs 113.774µs 114.119µs 114.376µs 114.524µs 0.92% 0.365 -0.140 0.31% 0.025µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 8731818.196op/s 8810109.746op/s ± 27272.256op/s 8811978.471op/s ± 20564.155op/s 8831054.633op/s 8849180.398op/s 8859445.527op/s 8886092.377op/s 0.84% -0.349 -0.152 0.31% 1928.440op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 23.414µs 24.142µs ± 0.371µs 24.110µs ± 0.260µs 24.402µs 24.802µs 25.000µs 25.223µs 4.61% 0.243 -0.446 1.53% 0.026µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 39646997.724op/s 41431631.704op/s ± 634104.382op/s 41476403.585op/s ± 448823.129op/s 41891844.920op/s 42454755.261op/s 42579541.533op/s 42709847.805op/s 2.97% -0.175 -0.505 1.53% 44837.951op/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 [2.014µs; 2.015µs] or [-0.018%; +0.018%] None None None
credit_card/is_card_number/ throughput [496345593.848op/s; 496522503.187op/s] or [-0.018%; +0.018%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [125.749µs; 125.912µs] or [-0.065%; +0.065%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [7942244.491op/s; 7952497.941op/s] or [-0.065%; +0.065%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [116.793µs; 116.945µs] or [-0.065%; +0.065%] None None None
credit_card/is_card_number/ 378282246310005 throughput [8551231.190op/s; 8562377.487op/s] or [-0.065%; +0.065%] None None None
credit_card/is_card_number/37828224631 execution_time [2.014µs; 2.015µs] or [-0.013%; +0.013%] None None None
credit_card/is_card_number/37828224631 throughput [496339281.063op/s; 496471096.832op/s] or [-0.013%; +0.013%] None None None
credit_card/is_card_number/378282246310005 execution_time [112.811µs; 113.010µs] or [-0.088%; +0.088%] None None None
credit_card/is_card_number/378282246310005 throughput [8849090.040op/s; 8864789.090op/s] or [-0.089%; +0.089%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [113.290µs; 113.377µs] or [-0.039%; +0.039%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [8820207.806op/s; 8826998.519op/s] or [-0.038%; +0.038%] None None None
credit_card/is_card_number/x371413321323331 execution_time [23.956µs; 24.056µs] or [-0.208%; +0.208%] None None None
credit_card/is_card_number/x371413321323331 throughput [41578997.795op/s; 41751348.187op/s] or [-0.207%; +0.207%] None None None
credit_card/is_card_number_no_luhn/ execution_time [2.014µs; 2.014µs] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ throughput [496437006.686op/s; 496488922.730op/s] or [-0.005%; +0.005%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [98.436µs; 98.561µs] or [-0.063%; +0.063%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [10146234.393op/s; 10159062.734op/s] or [-0.063%; +0.063%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [90.424µs; 90.594µs] or [-0.094%; +0.094%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [11038805.173op/s; 11059491.730op/s] or [-0.094%; +0.094%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [2.014µs; 2.015µs] or [-0.018%; +0.018%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [496337893.630op/s; 496511363.479op/s] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [86.455µs; 86.593µs] or [-0.080%; +0.080%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [11548642.204op/s; 11567019.389op/s] or [-0.080%; +0.080%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [113.458µs; 113.556µs] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [8806330.073op/s; 8813889.418op/s] or [-0.043%; +0.043%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [24.090µs; 24.193µs] or [-0.213%; +0.213%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [41343750.935op/s; 41519512.473op/s] or [-0.212%; +0.212%] None None None

Baseline

Omitted due to size.

Copy link
Contributor

@ekump ekump left a comment

Choose a reason for hiding this comment

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

I have some non-blocking style questions I'll ask later, due to urgency of getting this merged. LGTM after we add a unit test.

@@ -47,49 +47,56 @@ use tinybytes::{Bytes, BytesString};
/// };
/// let encoded_data = to_vec_named(&vec![vec![span]]).unwrap();
/// let encoded_data_as_tinybytes = tinybytes::Bytes::from(encoded_data);
/// let decoded_traces = from_slice(encoded_data_as_tinybytes).expect("Decoding failed");
/// let (decoded_traces, _) = from_slice(encoded_data_as_tinybytes).expect("Decoding failed");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// let (decoded_traces, _) = from_slice(encoded_data_as_tinybytes).expect("Decoding failed");
/// let (decoded_traces, _payload_size) = from_slice(encoded_data_as_tinybytes).expect("Decoding failed");

I think it's helpful to at least name the variable, even if we don't use it in the example.

@@ -270,7 +277,7 @@ mod tests {
..Default::default()
};
let encoded_data = rmp_serde::to_vec_named(&vec![vec![span]]).unwrap();
let decoded_traces =
let (decoded_traces, _) =
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably have at least one unit test that checks we're returning the correct size.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 83.33333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 71.79%. Comparing base (d01cf11) to head (ce20078).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
+ Coverage   71.78%   71.79%   +0.01%     
==========================================
  Files         271      271              
  Lines       40895    40912      +17     
==========================================
+ Hits        29357    29374      +17     
  Misses      11538    11538              
Components Coverage Δ
crashtracker 20.41% <ø> (ø)
crashtracker-ffi 9.07% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 91.60% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 82.73% <ø> (ø)
ddcommon-ffi 69.12% <ø> (ø)
ddtelemetry 59.10% <ø> (ø)
ddtelemetry-ffi 22.13% <ø> (ø)
dogstatsd 89.05% <ø> (ø)
dogstatsd-client 79.77% <ø> (ø)
ipc 82.79% <ø> (+0.10%) ⬆️
profiling 84.26% <ø> (ø)
profiling-ffi 77.42% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 36.07% <0.00%> (-0.01%) ⬇️
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 50.36% <ø> (ø)
tinybytes 94.77% <ø> (ø)
trace-mini-agent 72.66% <ø> (ø)
trace-normalization 98.25% <ø> (ø)
trace-obfuscation 95.73% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 93.29% <93.22%> (-0.08%) ⬇️

@bwoebi bwoebi merged commit 444fe4e into main Oct 3, 2024
30 checks passed
@bwoebi bwoebi deleted the bob/fix-payload-size branch October 3, 2024 17:46
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