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 meta struct serialization. #927

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

hoolioh
Copy link
Contributor

@hoolioh hoolioh commented Mar 14, 2025

What does this PR do?

Fix 'meta_struct' serialization field so it's serialized as a byte array, for that the new type is defined as HashMap<T, Bytes> so it holds a a slice from the incoming buffer rather than copying the bytes. Additionally Bytes implements serde::Serialization trait so it's properly serialized when called from serde.

@hoolioh hoolioh force-pushed the julio/fix-meta-struct branch from c74fc0b to 2beef4c Compare March 14, 2025 12:44
* Now 'meta_struct' is defined as HashMap<T, Bytes> so it holds a a
  slice from the buffer rather than copying the bytes in anther
  container.
* Bytes implements serialization so it's always serialized by serde
  as a byte array.
@pr-commenter
Copy link

pr-commenter bot commented Mar 14, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-03-14 12:57:46

Comparing candidate commit 1c85b90 in PR branch julio/fix-meta-struct with baseline commit fc9530e in branch main.

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

scenario:credit_card/is_card_number/378282246310005

  • 🟥 execution_time [+10.396µs; +10.662µs] or [+14.091%; +14.451%]
  • 🟥 throughput [-1711731.358op/s; -1672178.999op/s] or [-12.628%; -12.337%]

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 1c85b90 1741956363 julio/fix-meta-struct
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.319µs 505.860µs ± 0.676µs 505.818µs ± 0.408µs 506.245µs 506.784µs 507.100µs 511.175µs 1.06% 2.385 17.595 0.13% 0.048µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1956276.779op/s 1976836.168op/s ± 2631.912op/s 1976996.004op/s ± 1597.592op/s 1978543.955op/s 1980273.137op/s 1981680.700op/s 1982873.263op/s 0.30% -2.330 17.067 0.13% 186.104op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 452.531µs 453.459µs ± 0.326µs 453.454µs ± 0.180µs 453.637µs 454.045µs 454.319µs 454.644µs 0.26% 0.205 1.114 0.07% 0.023µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2199521.450op/s 2205271.813op/s ± 1584.568op/s 2205294.991op/s ± 873.958op/s 2206103.693op/s 2207718.104op/s 2209190.171op/s 2209790.921op/s 0.20% -0.199 1.109 0.07% 112.046op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 174.390µs 176.181µs ± 0.451µs 176.287µs ± 0.251µs 176.472µs 176.772µs 176.917µs 176.985µs 0.40% -1.195 2.069 0.26% 0.032µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5650191.672op/s 5676032.064op/s ± 14579.914op/s 5672577.842op/s ± 8060.638op/s 5683166.921op/s 5698921.026op/s 5725347.137op/s 5734264.130op/s 1.09% 1.215 2.143 0.26% 1030.956op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.604µs 37.709µs ± 0.043µs 37.705µs ± 0.031µs 37.736µs 37.796µs 37.830µs 37.842µs 0.36% 0.521 0.335 0.11% 0.003µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26425831.066op/s 26518970.645op/s ± 30536.381op/s 26521757.131op/s ± 21596.496op/s 26541256.187op/s 26562756.871op/s 26578262.995op/s 26592574.395op/s 0.27% -0.514 0.324 0.11% 2159.248op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 48.082µs 48.329µs ± 0.336µs 48.252µs ± 0.156µs 48.517µs 48.597µs 49.740µs 50.955µs 5.60% 4.602 30.948 0.69% 0.024µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 19625125.595op/s 20692275.163op/s ± 139666.409op/s 20724539.474op/s ± 67087.241op/s 20790311.715op/s 20793998.733op/s 20795224.228op/s 20797718.193op/s 0.35% -4.363 28.551 0.67% 9875.906op/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.766µs; 505.953µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1976471.411op/s; 1977200.926op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [453.414µs; 453.504µs] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2205052.207op/s; 2205491.419op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [176.118µs; 176.243µs] or [-0.035%; +0.035%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5674011.428op/s; 5678052.699op/s] or [-0.036%; +0.036%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.703µs; 37.715µs] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26514738.596op/s; 26523202.694op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [48.283µs; 48.376µs] or [-0.096%; +0.096%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20672918.742op/s; 20711631.584op/s] or [-0.094%; +0.094%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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 54.943ms 55.160ms ± 0.106ms 55.149ms ± 0.057ms 55.205ms 55.407ms 55.467ms 55.633ms 0.88% 1.306 2.822 0.19% 0.008ms 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 [55.145ms; 55.175ms] or [-0.027%; +0.027%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
ip_address/quantize_peer_ip_address_benchmark execution_time 4.992µs 5.045µs ± 0.046µs 5.039µs ± 0.031µs 5.065µs 5.149µs 5.152µs 5.157µs 2.35% 1.063 0.459 0.90% 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.039µs; 5.052µs] or [-0.126%; +0.126%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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.845µs 34.326µs ± 0.778µs 33.966µs ± 0.050µs 34.112µs 35.906µs 35.950µs 38.474µs 13.27% 2.043 3.851 2.26% 0.055µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [34.218µs; 34.434µs] or [-0.314%; +0.314%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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.222µs 3.180µs ± 1.426µs 2.984µs ± 0.035µs 3.019µs 3.622µs 13.776µs 15.014µs 403.16% 7.383 55.609 44.73% 0.101µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.983µs; 3.378µs] or [-6.215%; +6.215%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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.803µs 25.946µs ± 10.594µs 18.339µs ± 0.179µs 33.964µs 43.240µs 44.961µs 86.782µs 373.22% 1.904 6.792 40.73% 0.749µ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.478µs; 27.414µs] or [-5.659%; +5.659%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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.984ms 5.999ms ± 0.011ms 5.997ms ± 0.003ms 6.000ms 6.006ms 6.060ms 6.079ms 1.36% 4.955 29.856 0.18% 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.997ms; 6.000ms] or [-0.025%; +0.025%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 245.565ns 254.327ns ± 11.352ns 249.332ns ± 2.851ns 255.545ns 283.739ns 288.040ns 292.472ns 17.30% 1.792 2.203 4.45% 0.803ns 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 [252.754ns; 255.900ns] or [-0.619%; +0.619%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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 146.202µs 146.870µs ± 0.323µs 146.844µs ± 0.208µs 147.044µs 147.478µs 147.661µs 148.270µs 0.97% 0.722 1.261 0.22% 0.023µ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 [146.825µs; 146.915µs] or [-0.030%; +0.030%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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.334µs 2.390µs ± 0.016µs 2.389µs ± 0.006µs 2.396µs 2.416µs 2.425µs 2.433µs 1.83% -0.858 2.762 0.68% 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.387µs; 2.392µs] or [-0.094%; +0.094%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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.537µs 208.985µs ± 0.165µs 208.992µs ± 0.097µs 209.088µs 209.255µs 209.322µs 209.617µs 0.30% -0.014 0.584 0.08% 0.012µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 4770595.323op/s 4785030.853op/s ± 3782.999op/s 4784863.563op/s ± 2213.423op/s 4787045.935op/s 4791509.509op/s 4793900.134op/s 4795322.962op/s 0.22% 0.020 0.577 0.08% 267.498op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 18.228µs 18.308µs ± 0.039µs 18.308µs ± 0.025µs 18.333µs 18.367µs 18.386µs 18.520µs 1.16% 0.662 3.350 0.21% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 53994920.848op/s 54621622.637op/s ± 115982.914op/s 54620253.833op/s ± 75232.647op/s 54708568.873op/s 54810127.597op/s 54854636.481op/s 54860932.147op/s 0.44% -0.632 3.191 0.21% 8201.231op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.644µs 10.699µs ± 0.026µs 10.698µs ± 0.016µs 10.715µs 10.740µs 10.762µs 10.781µs 0.78% 0.197 -0.044 0.24% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 92752134.191op/s 93466188.624op/s ± 227886.740op/s 93472223.525op/s ± 141856.185op/s 93601610.217op/s 93841571.153op/s 93925520.846op/s 93953173.738op/s 0.51% -0.183 -0.058 0.24% 16114.026op/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 [208.962µs; 209.008µs] or [-0.011%; +0.011%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [4784506.566op/s; 4785555.141op/s] or [-0.011%; +0.011%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [18.302µs; 18.313µs] or [-0.029%; +0.029%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [54605548.521op/s; 54637696.754op/s] or [-0.029%; +0.029%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.696µs; 10.703µs] or [-0.034%; +0.034%] None None None
normalization/normalize_name/normalize_name/good throughput [93434605.713op/s; 93497771.534op/s] or [-0.034%; +0.034%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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 68.089µs 68.348µs ± 0.370µs 68.315µs ± 0.054µs 68.368µs 68.464µs 68.621µs 73.407µs 7.45% 12.860 173.225 0.54% 0.026µ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 [68.297µs; 68.399µs] or [-0.075%; +0.075%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 1c85b90 1741956363 julio/fix-meta-struct
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.914µs ± 0.005µs 3.913µs ± 0.001µs 3.914µs 3.916µs 3.918µs 3.981µs 1.72% 10.569 137.669 0.13% 0.000µs 1 200
credit_card/is_card_number/ throughput 251216794.491op/s 255519861.853op/s ± 334619.237op/s 255534595.922op/s ± 63614.891op/s 255599182.084op/s 255696169.928op/s 255835516.557op/s 256737784.841op/s 0.47% -10.457 136.036 0.13% 23661.153op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 81.824µs 82.428µs ± 0.388µs 82.379µs ± 0.154µs 82.547µs 82.894µs 83.021µs 86.853µs 5.43% 7.565 83.184 0.47% 0.027µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 11513692.942op/s 12132052.006op/s ± 55137.816op/s 12138964.088op/s ± 22696.884op/s 12160263.906op/s 12176900.847op/s 12194327.614op/s 12221284.589op/s 0.68% -7.179 77.300 0.45% 3898.832op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 76.365µs 77.041µs ± 0.427µs 76.990µs ± 0.195µs 77.197µs 77.501µs 77.843µs 81.636µs 6.03% 6.392 65.613 0.55% 0.030µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 12249563.562op/s 12980518.862op/s ± 69495.485op/s 12988758.879op/s ± 32978.149op/s 13017123.051op/s 13049235.897op/s 13064353.513op/s 13094934.346op/s 0.82% -5.963 59.486 0.53% 4914.073op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.896µs 3.914µs ± 0.005µs 3.914µs ± 0.001µs 3.915µs 3.918µs 3.920µs 3.970µs 1.44% 8.023 97.584 0.12% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 251869452.957op/s 255473559.508op/s ± 305861.089op/s 255490764.013op/s ± 75370.362op/s 255558542.074op/s 255741084.563op/s 255885656.159op/s 256697751.709op/s 0.47% -7.896 95.872 0.12% 21627.645op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 82.815µs 84.307µs ± 0.862µs 84.202µs ± 0.592µs 84.833µs 85.914µs 86.427µs 87.479µs 3.89% 0.812 0.803 1.02% 0.061µs 1 200
credit_card/is_card_number/378282246310005 throughput 11431309.454op/s 11862698.890op/s ± 120378.698op/s 11876163.947op/s ± 84148.320op/s 11959313.111op/s 12048053.607op/s 12065249.458op/s 12075136.573op/s 1.68% -0.748 0.630 1.01% 8512.059op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 51.909µs 52.168µs ± 0.082µs 52.166µs ± 0.057µs 52.223µs 52.305µs 52.368µs 52.482µs 0.61% 0.308 0.649 0.16% 0.006µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19054002.517op/s 19168924.587op/s ± 30097.612op/s 19169529.075op/s ± 20850.282op/s 19189984.271op/s 19216166.273op/s 19226557.229op/s 19264308.113op/s 0.49% -0.296 0.634 0.16% 2128.223op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.428µs 6.560µs ± 0.072µs 6.556µs ± 0.045µs 6.606µs 6.678µs 6.719µs 6.800µs 3.73% 0.233 -0.291 1.10% 0.005µs 1 200
credit_card/is_card_number/x371413321323331 throughput 147050818.965op/s 152454062.582op/s ± 1678559.080op/s 152536727.920op/s ± 1031476.798op/s 153509038.038op/s 155318936.086op/s 155478476.427op/s 155563910.482op/s 1.98% -0.179 -0.359 1.10% 118692.051op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.894µs 3.914µs ± 0.003µs 3.914µs ± 0.001µs 3.915µs 3.918µs 3.921µs 3.925µs 0.29% -1.260 11.408 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254764906.114op/s 255485539.289op/s ± 187913.564op/s 255491658.769op/s ± 77188.379op/s 255564157.130op/s 255723676.965op/s 255948192.715op/s 256774925.024op/s 0.50% 1.286 11.562 0.07% 13287.496op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 63.515µs 63.887µs ± 0.151µs 63.870µs ± 0.081µs 63.953µs 64.166µs 64.331µs 64.386µs 0.81% 0.850 1.437 0.24% 0.011µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15531351.269op/s 15652719.136op/s ± 36827.167op/s 15656700.612op/s ± 19826.292op/s 15674963.171op/s 15706940.740op/s 15730452.114op/s 15744197.110op/s 0.56% -0.831 1.405 0.23% 2604.074op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.417µs 57.533µs ± 0.071µs 57.516µs ± 0.022µs 57.540µs 57.635µs 57.880µs 57.950µs 0.75% 3.172 13.178 0.12% 0.005µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17256351.230op/s 17381462.351op/s ± 21346.312op/s 17386515.888op/s ± 6557.468op/s 17392142.230op/s 17400968.627op/s 17407628.114op/s 17416397.538op/s 0.17% -3.153 13.046 0.12% 1509.412op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.896µs 3.913µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.917µs 3.921µs 3.923µs 0.26% -0.611 5.233 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254880207.799op/s 255554137.196op/s ± 197334.679op/s 255546483.905op/s ± 107010.274op/s 255668978.037op/s 255862718.666op/s 255915421.886op/s 256687307.139op/s 0.45% 0.626 5.297 0.08% 13953.669op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.559µs 54.847µs ± 0.265µs 54.707µs ± 0.065µs 55.082µs 55.220µs 55.670µs 56.019µs 2.40% 1.472 2.158 0.48% 0.019µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17851070.567op/s 18233023.579op/s ± 87532.415op/s 18279156.291op/s ± 21657.180op/s 18295628.260op/s 18309862.793op/s 18320456.826op/s 18328838.595op/s 0.27% -1.444 2.014 0.48% 6189.476op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 51.951µs 52.191µs ± 0.099µs 52.179µs ± 0.063µs 52.248µs 52.367µs 52.448µs 52.568µs 0.75% 0.701 1.159 0.19% 0.007µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19022959.027op/s 19160436.637op/s ± 36454.147op/s 19164972.180op/s ± 23005.809op/s 19185321.796op/s 19214387.062op/s 19228142.101op/s 19248909.554op/s 0.44% -0.686 1.121 0.19% 2577.697op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.436µs 6.590µs ± 0.068µs 6.589µs ± 0.049µs 6.638µs 6.708µs 6.752µs 6.762µs 2.63% 0.220 -0.452 1.03% 0.005µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 147888538.190op/s 151767908.500op/s ± 1569913.166op/s 151775152.740op/s ± 1123505.486op/s 152890081.772op/s 154396274.349op/s 154592238.737op/s 155364186.336op/s 2.36% -0.174 -0.486 1.03% 111009.625op/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.018%; +0.018%] None None None
credit_card/is_card_number/ throughput [255473486.845op/s; 255566236.861op/s] or [-0.018%; +0.018%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [82.374µs; 82.482µs] or [-0.065%; +0.065%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12124410.435op/s; 12139693.577op/s] or [-0.063%; +0.063%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [76.982µs; 77.100µs] or [-0.077%; +0.077%] None None None
credit_card/is_card_number/ 378282246310005 throughput [12970887.456op/s; 12990150.268op/s] or [-0.074%; +0.074%] None None None
credit_card/is_card_number/37828224631 execution_time [3.914µs; 3.915µs] or [-0.017%; +0.017%] None None None
credit_card/is_card_number/37828224631 throughput [255431170.103op/s; 255515948.913op/s] or [-0.017%; +0.017%] None None None
credit_card/is_card_number/378282246310005 execution_time [84.187µs; 84.426µs] or [-0.142%; +0.142%] None None None
credit_card/is_card_number/378282246310005 throughput [11846015.560op/s; 11879382.220op/s] or [-0.141%; +0.141%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.157µs; 52.179µs] or [-0.022%; +0.022%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19164753.348op/s; 19173095.827op/s] or [-0.022%; +0.022%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.550µs; 6.570µs] or [-0.153%; +0.153%] None None None
credit_card/is_card_number/x371413321323331 throughput [152221430.437op/s; 152686694.727op/s] or [-0.153%; +0.153%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.914µs; 3.915µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255459496.276op/s; 255511582.301op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [63.866µs; 63.908µs] or [-0.033%; +0.033%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15647615.245op/s; 15657823.027op/s] or [-0.033%; +0.033%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [57.523µs; 57.542µs] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17378503.958op/s; 17384420.745op/s] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.913µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255526788.507op/s; 255581485.885op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.810µs; 54.884µs] or [-0.067%; +0.067%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18220892.429op/s; 18245154.730op/s] or [-0.067%; +0.067%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.177µs; 52.205µs] or [-0.026%; +0.026%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19155384.443op/s; 19165488.831op/s] or [-0.026%; +0.026%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.580µs; 6.599µs] or [-0.144%; +0.144%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [151550333.634op/s; 151985483.366op/s] or [-0.143%; +0.143%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.59%. Comparing base (fc9530e) to head (1c85b90).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #927      +/-   ##
==========================================
- Coverage   72.62%   72.59%   -0.03%     
==========================================
  Files         334      334              
  Lines       50480    50469      -11     
==========================================
- Hits        36659    36638      -21     
- Misses      13821    13831      +10     
Components Coverage Δ
crashtracker 42.87% <ø> (-0.06%) ⬇️
crashtracker-ffi 6.25% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 92.08% <ø> (ø)
data-pipeline-ffi 90.28% <ø> (ø)
ddcommon 79.19% <ø> (ø)
ddcommon-ffi 61.05% <ø> (ø)
ddtelemetry 61.74% <ø> (ø)
ddtelemetry-ffi 22.46% <ø> (ø)
dogstatsd 89.59% <ø> (ø)
dogstatsd-client 82.57% <ø> (ø)
ipc 82.50% <ø> (+0.10%) ⬆️
profiling 81.94% <ø> (ø)
profiling-ffi 70.68% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 40.63% <ø> (ø)
sidecar-ffi 3.23% <ø> (ø)
spawn-worker 54.37% <ø> (ø)
tinybytes 91.36% <100.00%> (+0.14%) ⬆️
trace-mini-agent 74.66% <ø> (ø)
trace-normalization 98.23% <ø> (ø)
trace-obfuscation 96.07% <ø> (ø)
trace-protobuf 78.13% <ø> (ø)
trace-utils 92.85% <100.00%> (-0.01%) ⬇️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hoolioh hoolioh marked this pull request as ready for review March 14, 2025 13:26
@hoolioh hoolioh requested review from a team as code owners March 14, 2025 13:26
@r1viollet
Copy link
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 26.67 MB 26.66 MB --.05% (-15.77 KB) 💪
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 84.33 MB 84.30 MB --.03% (-30.75 KB) 💪
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.60 MB 8.60 MB -0% (-328 B) 👌
aarch64-apple-darwin
Artifact Baseline Commit Change
/aarch64-apple-darwin/lib/libdatadog_profiling.a 47.49 MB 47.47 MB --.03% (-18.06 KB) 💪
/aarch64-apple-darwin/lib/libdatadog_profiling.dylib 8.88 MB 8.87 MB -0% (-784 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 25.33 MB 25.32 MB --.05% (-13.82 KB) 💪
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 78.97 MB 78.94 MB --.03% (-25.89 KB) 💪
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 8.54 MB 8.54 MB -0% (-328 B) 👌
i686-alpine-linux-musl
Artifact Baseline Commit Change
/i686-alpine-linux-musl/lib/libdatadog_profiling.a 73.11 MB 73.09 MB --.03% (-28.51 KB) 💪
/i686-alpine-linux-musl/lib/libdatadog_profiling.so 9.15 MB 9.15 MB --.04% (-4.20 KB) 💪
/i686-alpine-linux-musl/lib/libdatadog_profiling.so.debug 25.86 MB 25.85 MB --.05% (-15.14 KB) 💪
i686-unknown-linux-gnu
Artifact Baseline Commit Change
/i686-unknown-linux-gnu/lib/libdatadog_profiling.a 74.81 MB 74.78 MB --.03% (-28.07 KB) 💪
/i686-unknown-linux-gnu/lib/libdatadog_profiling.so 9.03 MB 9.03 MB -0% (-216 B) 👌
/i686-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 23.52 MB 23.51 MB --.06% (-14.93 KB) 💪
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 19.25 MB 19.24 MB --.05% (-11.00 KB) 💪
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 54.81 KB 54.81 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 133.67 MB 133.59 MB --.05% (-80.00 KB) 💪
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 861.90 MB 861.40 MB --.05% (-508.83 KB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 5.88 MB 5.87 MB --.04% (-2.50 KB) 💪
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 54.81 KB 54.81 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 17.86 MB 17.85 MB --.04% (-8.00 KB) 💪
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 30.16 MB 30.15 MB --.02% (-8.23 KB) 💪
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 16.39 MB 16.38 MB --.06% (-10.50 KB) 💪
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 55.66 KB 55.66 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 135.86 MB 135.78 MB --.05% (-80.00 KB) 💪
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 852.12 MB 851.96 MB --.01% (-159.16 KB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.47 MB 4.47 MB --.05% (-2.50 KB) 💪
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 55.66 KB 55.66 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 18.43 MB 18.42 MB --.04% (-8.00 KB) 💪
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 27.69 MB 27.69 MB --.02% (-5.90 KB) 💪
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 73.11 MB 73.09 MB --.03% (-28.51 KB) 💪
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.15 MB 9.15 MB --.04% (-4.20 KB) 💪
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so.debug 25.86 MB 25.85 MB --.05% (-15.14 KB) 💪
x86_64-apple-darwin
Artifact Baseline Commit Change
/x86_64-apple-darwin/lib/libdatadog_profiling.a 47.49 MB 47.47 MB --.03% (-18.06 KB) 💪
/x86_64-apple-darwin/lib/libdatadog_profiling.dylib 8.88 MB 8.87 MB -0% (-784 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 74.81 MB 74.78 MB --.03% (-28.07 KB) 💪
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.03 MB 9.03 MB -0% (-216 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so.debug 23.52 MB 23.51 MB --.06% (-14.93 KB) 💪

@@ -270,6 +273,16 @@ impl fmt::Debug for Bytes {
}
}

#[cfg(feature = "serde")]
impl Serialize for Bytes {
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's covered in trace-utils, but Is this something we should explicitly test in tinybytes as well?

Copy link
Contributor

@ganeshnj ganeshnj left a comment

Choose a reason for hiding this comment

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

Thanks for jumping on this.

Could you also update https://github.com/DataDog/libdatadog/blob/main/data-pipeline/examples/send-traces-with-stats.rs#L32 to generate synthetic meta structs and make sure it works round-trip?

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.

5 participants