DataDog / libdatadog

Datadog shared rust-based library. For now only used in other products (e.g. Ruby or PHP libraries).
Apache License 2.0
48 stars 9 forks source link

[APMSP-1583] Fix hash in BytesString #767

Closed VianneyRuhlmann closed 3 days ago

VianneyRuhlmann commented 3 days ago

What does this PR do?

BytesString derives Hash from Bytes which hashes the string as a &[u8]. BytesString also implements Borrow<str> which requires both types to have the same hash. The issue is that [u8] and str do not have compatible hash functions, so BytesString should use str hash implementation.

This PR also adds:

Motivation

Hash is required to handle meta hashmap in spans

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

codecov-commenter commented 3 days ago

Codecov Report

Attention: Patch coverage is 92.85714% with 3 lines in your changes missing coverage. Please review.

Project coverage is 70.54%. Comparing base (d339c64) to head (623b957).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #767 +/- ## ======================================= Coverage 70.53% 70.54% ======================================= Files 297 297 Lines 43484 43515 +31 ======================================= + Hits 30673 30698 +25 - Misses 12811 12817 +6 ``` | [Components](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | Coverage Δ | | |---|---|---| | [crashtracker](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `44.86% <ø> (ø)` | | | [crashtracker-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `8.41% <ø> (ø)` | | | [datadog-alloc](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `98.73% <ø> (ø)` | | | [data-pipeline](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `89.09% <ø> (ø)` | | | [data-pipeline-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `0.00% <ø> (ø)` | | | [ddcommon](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `83.46% <ø> (ø)` | | | [ddcommon-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `69.12% <ø> (ø)` | | | [ddtelemetry](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `59.05% <ø> (ø)` | | | [ddtelemetry-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `22.13% <ø> (ø)` | | | [dogstatsd](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `89.45% <ø> (ø)` | | | [dogstatsd-client](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `79.77% <ø> (ø)` | | | [ipc](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `82.76% <ø> (ø)` | | | [profiling](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `84.30% <ø> (ø)` | | | [profiling-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `77.46% <ø> (ø)` | | | [serverless](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `0.00% <ø> (ø)` | | | [sidecar](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `38.01% <ø> (ø)` | | | [sidecar-ffi](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `0.00% <ø> (ø)` | | | [spawn-worker](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `50.36% <ø> (ø)` | | | [tinybytes](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `93.47% <92.85%> (-1.30%)` | :arrow_down: | | [trace-mini-agent](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `72.36% <ø> (ø)` | | | [trace-normalization](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `98.23% <ø> (ø)` | | | [trace-obfuscation](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `95.77% <ø> (ø)` | | | [trace-protobuf](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `77.67% <ø> (ø)` | | | [trace-utils](https://app.codecov.io/gh/DataDog/libdatadog/pull/767/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=DataDog) | `93.29% <ø> (ø)` | |
pr-commenter[bot] commented 3 days ago

Benchmarks

Comparison

Benchmark execution time: 2024-11-27 12:21:51

Comparing candidate commit 623b957f in PR branch vianney/tiny-bytes/fix-hash with baseline commit d339c64a 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|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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|298.398ns|310.337ns ± 13.107ns|303.412ns ± 3.886ns|319.243ns|340.058ns|343.747ns|344.422ns|13.52% |1.162 |0.019 |4.21%|0.927ns|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|[308.520ns; 312.153ns] or [-0.585%; +0.585%]|None |None |None | ### Group 2 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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.593µs|2.643µs ± 0.020µs|2.640µs ± 0.008µs|2.650µs|2.691µs|2.697µs|2.699µs|2.21% |0.635 |1.458 |0.76%|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.640µs; 2.645µs] or [-0.105%; +0.105%]|None |None |None | ### Group 3 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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|152.612µs|153.375µs ± 1.114µs|153.252µs ± 0.128µs|153.385µs|154.041µs|154.411µs|168.417µs|9.90% |12.438 |165.181 |0.72%|0.079µ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|[153.221µs; 153.529µs] or [-0.101%; +0.101%]|None |None |None | ### Group 4 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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|280.187µs |280.814µs ± 0.302µs |280.805µs ± 0.175µs |280.941µs |281.291µs |281.690µs |282.326µs |0.54% |1.096 |3.011 |0.11%|0.021µs |1 |200 | |normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...|throughput |3542002.470op/s |3561078.381op/s ± 3825.624op/s |3561194.304op/s ± 2219.877op/s |3563781.912op/s |3566612.546op/s |3568478.916op/s |3569039.249op/s |0.22% |-1.084 |2.957 |0.11%|270.512op/s |1 |200 | |normalization/normalize_name/normalize_name/bad-name |execution_time|27.201µs |27.301µs ± 0.046µs |27.290µs ± 0.024µs |27.325µs |27.388µs |27.450µs |27.501µs |0.77% |1.244 |2.745 |0.17%|0.003µs |1 |200 | |normalization/normalize_name/normalize_name/bad-name |throughput |36362654.100op/s|36628272.182op/s ± 62061.532op/s |36643228.959op/s ± 31779.817op/s|36668054.235op/s|36710891.520op/s|36733966.932op/s|36762749.321op/s|0.33% |-1.228 |2.682 |0.17%|4388.413op/s |1 |200 | |normalization/normalize_name/normalize_name/good |execution_time|16.558µs |16.917µs ± 0.163µs |16.992µs ± 0.018µs |17.004µs |17.055µs |17.092µs |17.221µs |1.35% |-1.223 |-0.205 |0.96%|0.012µs |1 |200 | |normalization/normalize_name/normalize_name/good |throughput |58069559.391op/s|59119103.902op/s ± 576783.165op/s|58850765.298op/s ± 64068.779op/s|58968296.961op/s|60250529.426op/s|60306472.480op/s|60393517.969op/s|2.62% |1.231 |-0.199 |0.97%|40784.729op/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|[280.772µs; 280.856µs] or [-0.015%; +0.015%] |None |None |None | |normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo...|throughput |[3560548.187op/s; 3561608.576op/s] or [-0.015%; +0.015%] |None |None |None | |normalization/normalize_name/normalize_name/bad-name |execution_time|[27.295µs; 27.308µs] or [-0.024%; +0.024%] |None |None |None | |normalization/normalize_name/normalize_name/bad-name |throughput |[36619671.051op/s; 36636873.314op/s] or [-0.023%; +0.023%]|None |None |None | |normalization/normalize_name/normalize_name/good |execution_time|[16.894µs; 16.939µs] or [-0.134%; +0.134%] |None |None |None | |normalization/normalize_name/normalize_name/good |throughput |[59039167.303op/s; 59199040.502op/s] or [-0.135%; +0.135%]|None |None |None | ### Group 5 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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|508.739µs |509.665µs ± 0.754µs |509.484µs ± 0.246µs |509.802µs |511.353µs |512.013µs |514.797µs |1.04% |2.713 |11.245 |0.15%|0.053µs |1 |200 | |normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...|throughput |1942515.038op/s |1962076.187op/s ± 2892.597op/s |1962771.535op/s ± 946.119op/s |1963624.435op/s |1964837.011op/s |1965366.076op/s |1965646.057op/s |0.15% |-2.687 |11.007 |0.15%|204.538op/s |1 |200 | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |execution_time|465.561µs |466.503µs ± 0.361µs |466.508µs ± 0.217µs |466.673µs |467.125µs |467.396µs |467.967µs |0.31% |0.565 |1.146 |0.08%|0.026µs |1 |200 | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |throughput |2136904.017op/s |2143610.425op/s ± 1657.273op/s |2143586.929op/s ± 998.419op/s |2144718.795op/s |2145850.548op/s |2147552.701op/s |2147946.727op/s |0.20% |-0.559 |1.133 |0.08%|117.187op/s |1 |200 | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |execution_time|175.225µs |176.608µs ± 0.440µs |176.609µs ± 0.298µs |176.908µs |177.282µs |177.506µs |177.893µs |0.73% |-0.161 |-0.061 |0.25%|0.031µs |1 |200 | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |throughput |5621364.365op/s |5662305.306op/s ± 14113.229op/s |5662213.480op/s ± 9555.648op/s |5671693.471op/s |5686438.690op/s |5692660.062op/s |5706948.209op/s |0.79% |0.176 |-0.056 |0.25%|997.956op/s |1 |200 | |normalization/normalize_service/normalize_service/[empty string] |execution_time|44.942µs |45.204µs ± 0.083µs |45.211µs ± 0.053µs |45.258µs |45.348µs |45.408µs |45.436µs |0.50% |-0.043 |0.058 |0.18%|0.006µs |1 |200 | |normalization/normalize_service/normalize_service/[empty string] |throughput |22008931.568op/s|22122164.461op/s ± 40735.447op/s |22118712.227op/s ± 26110.024op/s|22151138.712op/s|22188309.785op/s|22206886.136op/s|22250679.948op/s|0.60% |0.054 |0.059 |0.18%|2880.431op/s|1 |200 | |normalization/normalize_service/normalize_service/test_ASCII |execution_time|41.808µs |42.061µs ± 0.194µs |41.993µs ± 0.080µs |42.100µs |42.483µs |42.592µs |42.684µs |1.65% |1.256 |0.653 |0.46%|0.014µs |1 |200 | |normalization/normalize_service/normalize_service/test_ASCII |throughput |23427952.224op/s|23775665.998op/s ± 109037.900op/s|23813692.155op/s ± 45259.659op/s|23844402.957op/s|23894839.435op/s|23909444.219op/s|23919018.090op/s|0.44% |-1.242 |0.614 |0.46%|7710.144op/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|[509.561µs; 509.770µs] or [-0.021%; +0.021%] |None |None |None | |normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000...|throughput |[1961675.301op/s; 1962477.074op/s] or [-0.020%; +0.020%] |None |None |None | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |execution_time|[466.453µs; 466.553µs] or [-0.011%; +0.011%] |None |None |None | |normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて |throughput |[2143380.743op/s; 2143840.107op/s] or [-0.011%; +0.011%] |None |None |None | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |execution_time|[176.547µs; 176.669µs] or [-0.035%; +0.035%] |None |None |None | |normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters |throughput |[5660349.348op/s; 5664261.264op/s] or [-0.035%; +0.035%] |None |None |None | |normalization/normalize_service/normalize_service/[empty string] |execution_time|[45.192µs; 45.215µs] or [-0.026%; +0.026%] |None |None |None | |normalization/normalize_service/normalize_service/[empty string] |throughput |[22116518.920op/s; 22127810.003op/s] or [-0.026%; +0.026%]|None |None |None | |normalization/normalize_service/normalize_service/test_ASCII |execution_time|[42.034µs; 42.088µs] or [-0.064%; +0.064%] |None |None |None | |normalization/normalize_service/normalize_service/test_ASCII |throughput |[23760554.394op/s; 23790777.603op/s] or [-0.064%; +0.064%]|None |None |None | ### Group 6 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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|4.620µs |4.632µs ± 0.007µs |4.632µs ± 0.002µs |4.633µs |4.636µs |4.640µs |4.720µs |1.90% |9.810 |120.977 |0.15%|0.000µs |1 |200 | |credit_card/is_card_number/ |throughput |211862141.697op/s|215889311.699op/s ± 323156.997op/s|215893499.738op/s ± 90144.525op/s |215994454.343op/s|216197578.644op/s|216241517.066op/s|216440499.705op/s|0.25% |-9.689 |119.001 |0.15%|22850.650op/s|1 |200 | |credit_card/is_card_number/ 3782-8224-6310-005 |execution_time|91.165µs |92.328µs ± 0.454µs |92.328µs ± 0.117µs |92.440µs |92.702µs |93.034µs |97.239µs |5.32% |6.143 |67.196 |0.49%|0.032µs |1 |200 | |credit_card/is_card_number/ 3782-8224-6310-005 |throughput |10283889.118op/s |10831185.687op/s ± 51812.729op/s |10830915.009op/s ± 13678.765op/s |10845440.116op/s |10882978.184op/s |10958954.859op/s |10969170.492op/s |1.28% |-5.689 |61.379 |0.48%|3663.713op/s |1 |200 | |credit_card/is_card_number/ 378282246310005 |execution_time|86.316µs |87.603µs ± 0.433µs |87.610µs ± 0.114µs |87.722µs |87.845µs |87.977µs |92.793µs |5.92% |8.419 |102.536 |0.49%|0.031µs |1 |200 | |credit_card/is_card_number/ 378282246310005 |throughput |10776708.291op/s |11415454.375op/s ± 54180.936op/s |11414218.156op/s ± 14859.429op/s |11429123.474op/s |11465969.063op/s |11524867.582op/s |11585343.432op/s |1.50% |-7.923 |95.551 |0.47%|3831.171op/s |1 |200 | |credit_card/is_card_number/37828224631 |execution_time|4.620µs |4.633µs ± 0.006µs |4.632µs ± 0.002µs |4.634µs |4.638µs |4.642µs |4.694µs |1.32% |6.705 |70.214 |0.12%|0.000µs |1 |200 | |credit_card/is_card_number/37828224631 |throughput |213049966.681op/s|215856242.018op/s ± 258290.280op/s|215872260.415op/s ± 97712.778op/s |215972739.627op/s|216114870.048op/s|216171223.759op/s|216459417.719op/s|0.27% |-6.607 |68.824 |0.12%|18263.881op/s|1 |200 | |credit_card/is_card_number/378282246310005 |execution_time|84.199µs |84.779µs ± 0.231µs |84.790µs ± 0.109µs |84.885µs |85.019µs |85.388µs |86.484µs |2.00% |1.776 |14.379 |0.27%|0.016µs |1 |200 | |credit_card/is_card_number/378282246310005 |throughput |11562874.354op/s |11795511.203op/s ± 31979.189op/s |11793777.019op/s ± 15205.912op/s |11809917.105op/s |11848395.219op/s |11872819.004op/s |11876613.659op/s |0.70% |-1.670 |13.559 |0.27%|2261.270op/s |1 |200 | |credit_card/is_card_number/37828224631000521389798 |execution_time|58.588µs |58.677µs ± 0.028µs |58.674µs ± 0.015µs |58.691µs |58.726µs |58.760µs |58.784µs |0.19% |0.526 |1.880 |0.05%|0.002µs |1 |200 | |credit_card/is_card_number/37828224631000521389798 |throughput |17011297.989op/s |17042436.680op/s ± 8176.433op/s |17043275.718op/s ± 4332.720op/s |17047154.673op/s |17053792.664op/s |17062768.317op/s |17068421.713op/s |0.15% |-0.521 |1.875 |0.05%|578.161op/s |1 |200 | |credit_card/is_card_number/x371413321323331 |execution_time|6.553µs |6.565µs ± 0.004µs |6.565µs ± 0.002µs |6.567µs |6.571µs |6.575µs |6.577µs |0.18% |0.311 |1.528 |0.05%|0.000µs |1 |200 | |credit_card/is_card_number/x371413321323331 |throughput |152051179.389op/s|152323320.025op/s ± 82950.175op/s |152328573.133op/s ± 39959.904op/s |152367606.647op/s|152466794.941op/s|152525476.794op/s|152595841.503op/s|0.18% |-0.306 |1.525 |0.05%|5865.463op/s |1 |200 | |credit_card/is_card_number_no_luhn/ |execution_time|4.619µs |4.632µs ± 0.003µs |4.632µs ± 0.002µs |4.634µs |4.637µs |4.639µs |4.647µs |0.33% |0.160 |2.255 |0.07%|0.000µs |1 |200 | |credit_card/is_card_number_no_luhn/ |throughput |215197916.796op/s|215898769.977op/s ± 161999.701op/s|215903411.276op/s ± 91313.212op/s |215989338.627op/s|216152184.789op/s|216303597.230op/s|216499921.282op/s|0.28% |-0.151 |2.245 |0.07%|11455.109op/s|1 |200 | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |execution_time|69.465µs |70.415µs ± 0.297µs |70.416µs ± 0.183µs |70.597µs |70.933µs |71.119µs |71.212µs |1.13% |-0.016 |0.446 |0.42%|0.021µs |1 |200 | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |throughput |14042641.906op/s |14201708.362op/s ± 59937.641op/s |14201277.690op/s ± 36804.778op/s |14238906.248op/s |14302616.955op/s |14351877.269op/s |14395751.904op/s |1.37% |0.047 |0.459 |0.42%|4238.231op/s |1 |200 | |credit_card/is_card_number_no_luhn/ 378282246310005 |execution_time|64.181µs |64.631µs ± 0.187µs |64.610µs ± 0.120µs |64.744µs |64.912µs |65.147µs |65.421µs |1.26% |0.715 |1.470 |0.29%|0.013µs |1 |200 | |credit_card/is_card_number_no_luhn/ 378282246310005 |throughput |15285626.728op/s |15472647.278op/s ± 44732.635op/s |15477511.181op/s ± 28653.079op/s |15502978.511op/s |15534748.825op/s |15566141.953op/s |15580958.661op/s |0.67% |-0.690 |1.401 |0.29%|3163.075op/s |1 |200 | |credit_card/is_card_number_no_luhn/37828224631 |execution_time|4.620µs |4.629µs ± 0.004µs |4.629µs ± 0.002µs |4.631µs |4.637µs |4.641µs |4.644µs |0.32% |0.616 |1.115 |0.09%|0.000µs |1 |200 | |credit_card/is_card_number_no_luhn/37828224631 |throughput |215313344.214op/s|216011782.194op/s ± 190867.821op/s|216011027.363op/s ± 104208.845op/s|216130683.418op/s|216312647.493op/s|216367629.404op/s|216458524.092op/s|0.21% |-0.609 |1.101 |0.09%|13496.393op/s|1 |200 | |credit_card/is_card_number_no_luhn/378282246310005 |execution_time|62.157µs |62.503µs ± 0.232µs |62.474µs ± 0.079µs |62.557µs |62.705µs |63.338µs |65.050µs |4.12% |7.114 |72.039 |0.37%|0.016µs |1 |200 | |credit_card/is_card_number_no_luhn/378282246310005 |throughput |15372897.984op/s |15999327.927op/s ± 57938.344op/s |16006565.094op/s ± 20153.247op/s |16025385.412op/s |16051006.005op/s |16062659.294op/s |16088292.550op/s |0.51% |-6.859 |68.172 |0.36%|4096.860op/s |1 |200 | |credit_card/is_card_number_no_luhn/37828224631000521389798|execution_time|58.585µs |58.686µs ± 0.214µs |58.667µs ± 0.016µs |58.685µs |58.727µs |58.757µs |61.673µs |5.12% |13.668 |188.172 |0.36%|0.015µs |1 |200 | |credit_card/is_card_number_no_luhn/37828224631000521389798|throughput |16214512.501op/s |17039952.226op/s ± 59231.946op/s |17045463.041op/s ± 4611.402op/s |17049081.639op/s |17055561.309op/s |17066777.795op/s |17069142.404op/s |0.14% |-13.631 |187.478 |0.35%|4188.331op/s |1 |200 | |credit_card/is_card_number_no_luhn/x371413321323331 |execution_time|6.555µs |6.564µs ± 0.004µs |6.564µs ± 0.002µs |6.566µs |6.571µs |6.573µs |6.597µs |0.50% |2.228 |16.537 |0.06%|0.000µs |1 |200 | |credit_card/is_card_number_no_luhn/x371413321323331 |throughput |151585742.028op/s|152335894.582op/s ± 97847.556op/s |152337602.519op/s ± 44241.184op/s |152382975.018op/s|152485275.115op/s|152526895.393op/s|152566129.258op/s|0.15% |-2.202 |16.305 |0.06%|6918.867op/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|[4.631µs; 4.633µs] or [-0.021%; +0.021%] |None |None |None | |credit_card/is_card_number/ |throughput |[215844525.248op/s; 215934098.151op/s] or [-0.021%; +0.021%]|None |None |None | |credit_card/is_card_number/ 3782-8224-6310-005 |execution_time|[92.265µs; 92.391µs] or [-0.068%; +0.068%] |None |None |None | |credit_card/is_card_number/ 3782-8224-6310-005 |throughput |[10824004.941op/s; 10838366.433op/s] or [-0.066%; +0.066%] |None |None |None | |credit_card/is_card_number/ 378282246310005 |execution_time|[87.543µs; 87.663µs] or [-0.068%; +0.068%] |None |None |None | |credit_card/is_card_number/ 378282246310005 |throughput |[11407945.418op/s; 11422963.331op/s] or [-0.066%; +0.066%] |None |None |None | |credit_card/is_card_number/37828224631 |execution_time|[4.632µs; 4.633µs] or [-0.017%; +0.017%] |None |None |None | |credit_card/is_card_number/37828224631 |throughput |[215820445.469op/s; 215892038.566op/s] or [-0.017%; +0.017%]|None |None |None | |credit_card/is_card_number/378282246310005 |execution_time|[84.747µs; 84.811µs] or [-0.038%; +0.038%] |None |None |None | |credit_card/is_card_number/378282246310005 |throughput |[11791079.195op/s; 11799943.211op/s] or [-0.038%; +0.038%] |None |None |None | |credit_card/is_card_number/37828224631000521389798 |execution_time|[58.673µs; 58.681µs] or [-0.007%; +0.007%] |None |None |None | |credit_card/is_card_number/37828224631000521389798 |throughput |[17041303.505op/s; 17043569.854op/s] or [-0.007%; +0.007%] |None |None |None | |credit_card/is_card_number/x371413321323331 |execution_time|[6.564µs; 6.565µs] or [-0.008%; +0.008%] |None |None |None | |credit_card/is_card_number/x371413321323331 |throughput |[152311823.928op/s; 152334816.121op/s] or [-0.008%; +0.008%]|None |None |None | |credit_card/is_card_number_no_luhn/ |execution_time|[4.631µs; 4.632µs] or [-0.010%; +0.010%] |None |None |None | |credit_card/is_card_number_no_luhn/ |throughput |[215876318.376op/s; 215921221.577op/s] or [-0.010%; +0.010%]|None |None |None | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |execution_time|[70.374µs; 70.456µs] or [-0.058%; +0.058%] |None |None |None | |credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 |throughput |[14193401.582op/s; 14210015.143op/s] or [-0.058%; +0.058%] |None |None |None | |credit_card/is_card_number_no_luhn/ 378282246310005 |execution_time|[64.605µs; 64.657µs] or [-0.040%; +0.040%] |None |None |None | |credit_card/is_card_number_no_luhn/ 378282246310005 |throughput |[15466447.765op/s; 15478846.791op/s] or [-0.040%; +0.040%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631 |execution_time|[4.629µs; 4.630µs] or [-0.012%; +0.012%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631 |throughput |[215985329.750op/s; 216038234.639op/s] or [-0.012%; +0.012%]|None |None |None | |credit_card/is_card_number_no_luhn/378282246310005 |execution_time|[62.471µs; 62.536µs] or [-0.051%; +0.051%] |None |None |None | |credit_card/is_card_number_no_luhn/378282246310005 |throughput |[15991298.230op/s; 16007357.624op/s] or [-0.050%; +0.050%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631000521389798|execution_time|[58.657µs; 58.716µs] or [-0.051%; +0.051%] |None |None |None | |credit_card/is_card_number_no_luhn/37828224631000521389798|throughput |[17031743.248op/s; 17048161.204op/s] or [-0.048%; +0.048%] |None |None |None | |credit_card/is_card_number_no_luhn/x371413321323331 |execution_time|[6.564µs; 6.565µs] or [-0.009%; +0.009%] |None |None |None | |credit_card/is_card_number_no_luhn/x371413321323331 |throughput |[152322333.851op/s; 152349455.312op/s] or [-0.009%; +0.009%]|None |None |None | ### Group 7 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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.349µs|75.564µs ± 0.134µs|75.550µs ± 0.035µs|75.586µs|75.666µs|75.815µs|77.102µs|2.05% |8.074 |87.322 |0.18%|0.009µ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.546µs; 75.583µs] 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|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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.520µs|38.953µs ± 0.737µs|38.621µs ± 0.049µs|38.694µs|40.504µs|40.557µs|41.806µs|8.24% |1.769 |1.453 |1.89%|0.052µ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.851µs; 39.056µs] or [-0.262%; +0.262%]|None |None |None | ### Group 9 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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|58.227ms|58.390ms ± 0.097ms|58.382ms ± 0.048ms|58.420ms|58.564ms|58.745ms|58.989ms|1.04% |2.232 |8.939 |0.17%|0.007ms|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|[58.376ms; 58.403ms] or [-0.023%; +0.023%]|None |None |None | ### Group 10 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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.455µs|3.240µs ± 1.438µs|3.088µs ± 0.024µs|3.108µs|3.138µs|14.180µs|15.260µs|394.16% |7.653 |58.398 |44.27%|0.102µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |--------------------|--------------|----------------------------------------|-------------------|------------------------|---------------| |write only interface|execution_time|[3.041µs; 3.439µs] or [-6.151%; +6.151%]|None |None |None | ### Group 11 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |scenario |metric |min |mean ± sd |median ± mad |p75 |p95 |p99 |max |peak_to_median_ratio|skewness|kurtosis|cv |sem |runs|sample_size| |-----------------|--------------|--------|-------------------|------------------|--------|--------|--------|---------|--------------------|--------|--------|------|-------|----|-----------| |two way interface|execution_time|18.732µs|24.704µs ± 14.092µs|18.937µs ± 0.059µs|19.123µs|46.991µs|49.933µs|161.697µs|753.87% |5.470 |45.142 |56.90%|0.996µs|1 |200 | |scenario |metric |95% CI mean |Shapiro-Wilk pvalue|Ljung-Box pvalue (lag=1)|Dip test pvalue| |-----------------|--------------|------------------------------------------|-------------------|------------------------|---------------| |two way interface|execution_time|[22.751µs; 26.657µs] or [-7.905%; +7.905%]|None |None |None | ### Group 12 |cpu_model |git_commit_sha|git_commit_date|git_branch | |----------------------------------------------|--------------|---------------|---------------------------| |Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz|623b957f |1732709410 |vianney/tiny-bytes/fix-hash| |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|9.115ms|9.150ms ± 0.017ms|9.148ms ± 0.009ms|9.157ms|9.175ms|9.214ms|9.232ms|0.91% |1.293 |3.880 |0.19%|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|[9.147ms; 9.152ms] or [-0.026%; +0.026%]|None |None |None |

Baseline

Omitted due to size.