Skip to content

Conversation

@dd-oleksii
Copy link
Contributor

What does this PR do?

Add pyo3 conversion methods for datadog-ffe.

Motivation

This will allow our Python tracer to easily call into datadog-ffe with Rust automatically doing conversion from Python to Rust types (and vice versa)

How to test the change?

Will be tested as part of ddtrace.

@dd-oleksii dd-oleksii requested a review from avara1986 October 30, 2025 02:12
@dd-oleksii dd-oleksii requested review from a team as code owners October 30, 2025 02:12
Comment on lines +74 to +83
/// Convert Python value to Attribute.
///
/// The following types are currently supported:
/// - `str`
/// - `int`
/// - `float`
/// - `bool`
/// - `NoneType`
///
/// Note that nesting is not currently supported and will throw an error.
Copy link
Contributor Author

@dd-oleksii dd-oleksii Oct 30, 2025

Choose a reason for hiding this comment

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

@avara1986 note that we don't support nested dicts, dicts, and datetime attributes, so these need to be filtered out before getting passed into Rust.

Comment on lines +59 to +76
/// Accepts either a dict with `"targeting_key"` and `"attributes"` items, or any object with
/// `targeting_key` and `attributes` attributes.
///
/// # Examples
///
/// ```python
/// {"targeting_key": "user1", "attributes": {"attr1": 42}}
/// ```
///
/// ```python
/// @dataclass
/// class EvaluationContext:
/// targeting_key: Optional[str]
/// attributes: dict[str, Any]
///
/// EvaluationContext(targeting_key="user1", attributes={"attr1": 42})
/// ```
impl<'py> FromPyObject<'py> for EvaluationContext {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@avara1986 for evaluation context, either a dict or an object with targeting_key/attributes is accepted. (We can technically pass OF's EvaluationContext if we filter out unsupported attributes.)


/// Result of assignment evaluation.
#[derive(Debug, Serialize, Clone)]
#[cfg_attr(feature = "pyo3", pyo3::pyclass(frozen))]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@avara1986 found a way to expose enums and classes from Rust, so Assignment and AssignmentReason are proper Python classes now.

Comment on lines +512 to +539
/// Convert `VariationType` from Python string.
///
/// The value must be one of:
/// ```python
/// # Preferred:
/// "string"
/// "integer"
/// "float"
/// "boolean"
/// "object"
///
/// # Legacy (for compatibility):
/// "STRING"
/// "INTEGER"
/// "NUMERIC"
/// "BOOLEAN"
/// "JSON"
/// ```
impl<'py> FromPyObject<'py> for VariationType {
#[inline]
fn extract_bound(value: &Bound<'py, PyAny>) -> PyResult<Self> {
let s = value.downcast::<PyString>()?.to_cow()?;
let ty = match s.as_ref() {
"string" | "STRING" => VariationType::String,
"integer" | "INTEGER" => VariationType::Integer,
"float" | "NUMERIC" => VariationType::Numeric,
"boolean" | "BOOLEAN" => VariationType::Boolean,
"object" | "JSON" => VariationType::Json,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@avara1986 TBD: VariationType stays as string for now but we can convert to enum in the future. The reason I didn't do this yet is because our internal names are inconsistent 😢

@pr-commenter
Copy link

pr-commenter bot commented Oct 30, 2025

Benchmarks

Comparison

Benchmark execution time: 2025-10-30 02:24:44

Comparing candidate commit 8a462e1 in PR branch ffe-pyo3-methods with baseline commit 3ad7d4a in branch main.

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

scenario:benching deserializing traces from msgpack to their internal representation

  • 🟥 execution_time [+2.621ms; +3.578ms] or [+4.378%; +5.976%]

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 8a462e1 1761790246 ffe-pyo3-methods
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 62.232ms 62.964ms ± 2.439ms 62.614ms ± 0.064ms 62.704ms 63.005ms 81.273ms 84.117ms 34.34% 7.793 59.952 3.86% 0.172ms 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 [62.626ms; 63.302ms] or [-0.537%; +0.537%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 3.894µs 3.914µs ± 0.003µs 3.913µs ± 0.001µs 3.915µs 3.918µs 3.920µs 3.921µs 0.19% -1.553 14.230 0.07% 0.000µs 1 200
credit_card/is_card_number/ throughput 255057093.357op/s 255523043.693op/s ± 170199.277op/s 255541576.619op/s ± 89461.118op/s 255619949.661op/s 255709295.502op/s 255805203.492op/s 256793313.846op/s 0.49% 1.581 14.454 0.07% 12034.906op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 77.884µs 79.499µs ± 0.631µs 79.512µs ± 0.420µs 79.941µs 80.541µs 80.810µs 80.828µs 1.66% -0.185 -0.234 0.79% 0.045µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12371931.946op/s 12579512.958op/s ± 99945.482op/s 12576781.911op/s ± 66409.537op/s 12642941.416op/s 12746296.345op/s 12829281.013op/s 12839570.694op/s 2.09% 0.226 -0.206 0.79% 7067.213op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 71.435µs 71.867µs ± 0.289µs 71.829µs ± 0.201µs 72.027µs 72.370µs 72.771µs 72.880µs 1.46% 0.901 0.946 0.40% 0.020µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13721178.786op/s 13914770.919op/s ± 55815.834op/s 13921860.083op/s ± 38930.662op/s 13961332.730op/s 13988741.372op/s 13992276.992op/s 13998765.309op/s 0.55% -0.875 0.874 0.40% 3946.775op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.896µs 3.916µs ± 0.003µs 3.916µs ± 0.002µs 3.918µs 3.920µs 3.922µs 3.922µs 0.17% -1.271 7.813 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254955338.909op/s 255372467.307op/s ± 199385.927op/s 255390335.398op/s ± 142305.498op/s 255498524.515op/s 255641954.209op/s 255715478.136op/s 256688287.087op/s 0.51% 1.290 7.959 0.08% 14098.714op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 68.273µs 68.725µs ± 0.314µs 68.640µs ± 0.212µs 68.889µs 69.297µs 69.572µs 70.213µs 2.29% 1.086 1.899 0.46% 0.022µs 1 200
credit_card/is_card_number/378282246310005 throughput 14242326.751op/s 14551086.674op/s ± 66117.902op/s 14568666.441op/s ± 45107.773op/s 14590047.764op/s 14639157.773op/s 14645617.468op/s 14647184.440op/s 0.54% -1.050 1.736 0.45% 4675.242op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 45.455µs 45.742µs ± 0.102µs 45.751µs ± 0.065µs 45.815µs 45.890µs 45.946µs 45.959µs 0.46% -0.408 -0.135 0.22% 0.007µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21758303.401op/s 21861880.549op/s ± 48816.717op/s 21857578.880op/s ± 30945.566op/s 21888266.799op/s 21951682.826op/s 21980896.131op/s 21999804.312op/s 0.65% 0.419 -0.123 0.22% 3451.863op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.572µs 6.629µs ± 0.012µs 6.632µs ± 0.007µs 6.638µs 6.642µs 6.647µs 6.658µs 0.38% -1.095 2.190 0.18% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 150199394.922op/s 150853893.988op/s ± 270056.839op/s 150775173.238op/s ± 160648.007op/s 151031083.656op/s 151339530.104op/s 151680077.769op/s 152150187.662op/s 0.91% 1.111 2.261 0.18% 19095.902op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.896µs 3.915µs ± 0.003µs 3.915µs ± 0.001µs 3.917µs 3.919µs 3.923µs 3.926µs 0.27% -1.078 11.073 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254719234.602op/s 255399078.908op/s ± 180706.475op/s 255404938.287op/s ± 94247.639op/s 255492692.950op/s 255627610.620op/s 255735369.387op/s 256646774.784op/s 0.49% 1.104 11.231 0.07% 12777.877op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 65.048µs 65.743µs ± 0.083µs 65.743µs ± 0.035µs 65.781µs 65.840µs 65.896µs 65.901µs 0.24% -4.862 38.253 0.13% 0.006µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15174291.616op/s 15210835.347op/s ± 19340.622op/s 15210839.383op/s ± 8047.266op/s 15217790.074op/s 15225525.636op/s 15235360.864op/s 15373157.783op/s 1.07% 4.925 38.872 0.13% 1367.589op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 53.360µs 53.421µs ± 0.031µs 53.417µs ± 0.020µs 53.439µs 53.478µs 53.516µs 53.530µs 0.21% 0.774 0.710 0.06% 0.002µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18681026.149op/s 18719188.204op/s ± 10817.167op/s 18720781.143op/s ± 6950.630op/s 18727009.607op/s 18733363.366op/s 18738936.255op/s 18740734.302op/s 0.11% -0.771 0.701 0.06% 764.889op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.893µs 3.916µs ± 0.003µs 3.916µs ± 0.001µs 3.917µs 3.920µs 3.922µs 3.923µs 0.19% -2.008 16.205 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254897011.727op/s 255387210.321op/s ± 189310.574op/s 255371947.392op/s ± 89594.261op/s 255488507.609op/s 255641513.530op/s 255721318.978op/s 256845371.644op/s 0.58% 2.040 16.479 0.07% 13386.279op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 50.156µs 50.236µs ± 0.030µs 50.236µs ± 0.019µs 50.257µs 50.280µs 50.311µs 50.332µs 0.19% -0.050 0.340 0.06% 0.002µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 19867999.001op/s 19905908.542op/s ± 11710.926op/s 19905980.075op/s ± 7558.532op/s 19913046.199op/s 19925797.939op/s 19933372.386op/s 19937696.692op/s 0.16% 0.054 0.338 0.06% 828.088op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 45.493µs 45.717µs ± 0.095µs 45.715µs ± 0.063µs 45.782µs 45.882µs 45.929µs 45.940µs 0.49% 0.011 -0.375 0.21% 0.007µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21767358.425op/s 21873670.802op/s ± 45401.351op/s 21874540.258op/s ± 30307.140op/s 21899143.202op/s 21948283.371op/s 21973734.029op/s 21981348.575op/s 0.49% -0.001 -0.375 0.21% 3210.360op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.594µs 6.633µs ± 0.010µs 6.635µs ± 0.005µs 6.640µs 6.644µs 6.646µs 6.647µs 0.18% -1.452 2.206 0.16% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 150449355.359op/s 150767491.307op/s ± 236871.607op/s 150719872.047op/s ± 124311.463op/s 150856282.992op/s 151214872.400op/s 151598907.504op/s 151652104.047op/s 0.62% 1.462 2.243 0.16% 16749.352op/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.009%; +0.009%] None None None
credit_card/is_card_number/ throughput [255499455.710op/s; 255546631.676op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [79.412µs; 79.587µs] or [-0.110%; +0.110%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12565661.476op/s; 12593364.441op/s] or [-0.110%; +0.110%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [71.827µs; 71.907µs] or [-0.056%; +0.056%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13907035.381op/s; 13922506.456op/s] or [-0.056%; +0.056%] None None None
credit_card/is_card_number/37828224631 execution_time [3.915µs; 3.916µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255344834.336op/s; 255400100.279op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [68.681µs; 68.768µs] or [-0.063%; +0.063%] None None None
credit_card/is_card_number/378282246310005 throughput [14541923.369op/s; 14560249.980op/s] or [-0.063%; +0.063%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.728µs; 45.756µs] or [-0.031%; +0.031%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [21855115.021op/s; 21868646.076op/s] or [-0.031%; +0.031%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.627µs; 6.631µs] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/x371413321323331 throughput [150816466.708op/s; 150891321.269op/s] or [-0.025%; +0.025%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.915µs; 3.916µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255374034.729op/s; 255424123.088op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [65.731µs; 65.754µs] or [-0.018%; +0.018%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15208154.922op/s; 15213515.771op/s] or [-0.018%; +0.018%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [53.417µs; 53.425µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18717689.049op/s; 18720687.359op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.915µs; 3.916µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255360973.696op/s; 255413446.946op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [50.232µs; 50.240µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [19904285.521op/s; 19907531.564op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.704µs; 45.730µs] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [21867378.611op/s; 21879962.992op/s] or [-0.029%; +0.029%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.631µs; 6.634µs] or [-0.022%; +0.022%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [150734663.181op/s; 150800319.434op/s] or [-0.022%; +0.022%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sdk_test_data/rules-based execution_time 121.465µs 122.711µs ± 1.382µs 122.473µs ± 0.378µs 122.919µs 124.379µs 126.837µs 137.506µs 12.27% 7.025 67.006 1.12% 0.098µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sdk_test_data/rules-based execution_time [122.520µs; 122.903µs] or [-0.156%; +0.156%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
single_flag_killswitch/rules-based execution_time 172.188ns 175.895ns ± 2.875ns 175.158ns ± 1.727ns 177.497ns 181.715ns 184.780ns 185.810ns 6.08% 1.150 1.142 1.63% 0.203ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
single_flag_killswitch/rules-based execution_time [175.497ns; 176.294ns] or [-0.227%; +0.227%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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.206µs 3.181µs ± 1.433µs 3.010µs ± 0.025µs 3.029µs 3.373µs 13.722µs 15.178µs 404.31% 7.497 56.907 44.93% 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.380µs] or [-6.242%; +6.242%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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 185.553µs 185.996µs ± 0.219µs 185.987µs ± 0.176µs 186.167µs 186.348µs 186.477µs 186.744µs 0.41% 0.382 -0.271 0.12% 0.015µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5354920.087op/s 5376456.426op/s ± 6314.811op/s 5376733.611op/s ± 5089.389op/s 5381713.141op/s 5385050.714op/s 5387845.514op/s 5389282.711op/s 0.23% -0.376 -0.282 0.12% 446.525op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.773µs 17.850µs ± 0.049µs 17.844µs ± 0.033µs 17.880µs 17.935µs 17.955µs 18.141µs 1.66% 1.275 5.243 0.27% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55124774.232op/s 56023889.691op/s ± 152008.710op/s 56040137.927op/s ± 104013.836op/s 56133611.397op/s 56255439.413op/s 56263881.842op/s 56265147.854op/s 0.40% -1.230 4.943 0.27% 10748.639op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.517µs 10.563µs ± 0.031µs 10.560µs ± 0.016µs 10.579µs 10.597µs 10.631µs 10.850µs 2.75% 3.879 33.343 0.30% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 92162980.734op/s 94673805.497op/s ± 278742.206op/s 94695874.536op/s ± 145445.451op/s 94818340.550op/s 95051616.480op/s 95083680.861op/s 95086427.030op/s 0.41% -3.702 31.275 0.29% 19710.050op/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 [185.966µs; 186.027µs] or [-0.016%; +0.016%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5375581.253op/s; 5377331.598op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.843µs; 17.856µs] or [-0.038%; +0.038%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [56002822.746op/s; 56044956.637op/s] or [-0.038%; +0.038%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.558µs; 10.567µs] or [-0.041%; +0.041%] None None None
normalization/normalize_name/normalize_name/good throughput [94635174.508op/s; 94712436.486op/s] or [-0.041%; +0.041%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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 10.681ms 10.706ms ± 0.017ms 10.703ms ± 0.007ms 10.713ms 10.725ms 10.780ms 10.822ms 1.11% 3.393 19.323 0.16% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [10.704ms; 10.709ms] or [-0.022%; +0.022%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
receiver_entry_point/report/2597 execution_time 6.147ms 6.358ms ± 0.038ms 6.355ms ± 0.017ms 6.377ms 6.417ms 6.489ms 6.500ms 2.28% -0.466 8.606 0.59% 0.003ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2597 execution_time [6.352ms; 6.363ms] or [-0.082%; +0.082%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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 161.948µs 162.592µs ± 0.299µs 162.562µs ± 0.158µs 162.727µs 162.977µs 163.502µs 164.713µs 1.32% 2.225 12.388 0.18% 0.021µ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 [162.551µs; 162.633µs] or [-0.025%; +0.025%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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.357µs 2.411µs ± 0.015µs 2.411µs ± 0.007µs 2.419µs 2.438µs 2.444µs 2.445µs 1.42% -0.675 1.972 0.64% 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.409µs; 2.413µs] or [-0.089%; +0.089%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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 32.585µs 33.302µs ± 1.232µs 32.769µs ± 0.101µs 32.865µs 35.921µs 35.989µs 37.532µs 14.53% 1.735 1.171 3.69% 0.087µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [33.131µs; 33.472µs] or [-0.513%; +0.513%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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.586µs 25.379µs ± 9.863µs 17.916µs ± 0.269µs 34.283µs 43.450µs 44.545µs 71.966µs 301.68% 1.063 1.064 38.76% 0.697µ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.012µs; 26.746µs] or [-5.386%; +5.386%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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 496.091µs 496.902µs ± 0.564µs 496.801µs ± 0.311µs 497.161µs 497.660µs 497.969µs 502.229µs 1.09% 4.315 37.895 0.11% 0.040µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1991123.571op/s 2012473.518op/s ± 2274.264op/s 2012876.595op/s ± 1262.003op/s 2013919.879op/s 2015100.920op/s 2015496.580op/s 2015757.400op/s 0.14% -4.244 37.002 0.11% 160.815op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 370.317µs 371.088µs ± 0.613µs 371.020µs ± 0.184µs 371.230µs 371.492µs 371.714µs 376.677µs 1.52% 7.087 61.106 0.16% 0.043µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2654797.184op/s 2694787.066op/s ± 4399.610op/s 2695274.229op/s ± 1337.899op/s 2696400.856op/s 2698779.166op/s 2699644.660op/s 2700392.297op/s 0.19% -7.023 60.371 0.16% 311.099op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 168.345µs 168.782µs ± 0.155µs 168.778µs ± 0.086µs 168.861µs 169.032µs 169.204µs 169.364µs 0.35% 0.416 0.954 0.09% 0.011µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5904435.206op/s 5924790.730op/s ± 5435.393op/s 5924927.722op/s ± 3025.928op/s 5927972.584op/s 5932821.572op/s 5936867.804op/s 5940179.081op/s 0.26% -0.408 0.943 0.09% 384.340op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 36.140µs 36.426µs ± 0.117µs 36.415µs ± 0.061µs 36.480µs 36.614µs 36.928µs 36.958µs 1.49% 1.408 4.429 0.32% 0.008µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 27058051.298op/s 27452981.303op/s ± 88026.264op/s 27461191.079op/s ± 46303.298op/s 27506081.073op/s 27569146.556op/s 27594443.210op/s 27670221.096op/s 0.76% -1.365 4.246 0.32% 6224.397op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 46.208µs 46.317µs ± 0.154µs 46.301µs ± 0.033µs 46.334µs 46.403µs 46.451µs 48.368µs 4.46% 11.817 154.400 0.33% 0.011µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20674679.100op/s 21590762.513op/s ± 69284.294op/s 21597587.982op/s ± 15315.786op/s 21612990.705op/s 21628274.817op/s 21634470.444op/s 21641352.296op/s 0.20% -11.649 151.399 0.32% 4899.139op/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 [496.823µs; 496.980µs] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2012158.327op/s; 2012788.709op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [371.003µs; 371.173µs] or [-0.023%; +0.023%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2694177.323op/s; 2695396.810op/s] or [-0.023%; +0.023%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [168.761µs; 168.804µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5924037.437op/s; 5925544.023op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [36.410µs; 36.443µs] or [-0.045%; +0.045%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [27440781.710op/s; 27465180.897op/s] or [-0.044%; +0.044%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [46.295µs; 46.338µs] or [-0.046%; +0.046%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21581160.376op/s; 21600364.649op/s] or [-0.044%; +0.044%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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 239.288ns 252.228ns ± 14.018ns 245.546ns ± 4.123ns 252.919ns 277.881ns 293.674ns 297.824ns 21.29% 1.485 1.166 5.54% 0.991ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [250.285ns; 254.170ns] or [-0.770%; +0.770%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching serializing traces from their internal representation to msgpack execution_time 14.205ms 14.248ms ± 0.036ms 14.243ms ± 0.011ms 14.255ms 14.294ms 14.367ms 14.554ms 2.18% 4.535 29.696 0.25% 0.003ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching serializing traces from their internal representation to msgpack execution_time [14.244ms; 14.253ms] or [-0.035%; +0.035%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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.980µs 5.058µs ± 0.038µs 5.060µs ± 0.030µs 5.086µs 5.120µs 5.121µs 5.123µs 1.24% -0.084 -1.141 0.74% 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.053µs; 5.063µs] or [-0.104%; +0.104%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 8a462e1 1761790246 ffe-pyo3-methods
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 85.340µs 85.526µs ± 0.148µs 85.506µs ± 0.059µs 85.569µs 85.668µs 85.954µs 87.054µs 1.81% 5.933 55.452 0.17% 0.010µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [85.505µs; 85.547µs] or [-0.024%; +0.024%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 5.34351% with 124 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.91%. Comparing base (3ad7d4a) to head (8a462e1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1289      +/-   ##
==========================================
- Coverage   72.05%   71.91%   -0.15%     
==========================================
  Files         368      369       +1     
  Lines       58076    58198     +122     
==========================================
+ Hits        41847    41852       +5     
- Misses      16229    16346     +117     
Components Coverage Δ
datadog-crashtracker 50.63% <ø> (-0.03%) ⬇️
datadog-crashtracker-ffi 5.86% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 88.16% <ø> (ø)
data-pipeline-ffi 88.19% <ø> (ø)
ddcommon 80.95% <ø> (ø)
ddcommon-ffi 73.84% <ø> (ø)
ddtelemetry 60.02% <ø> (ø)
ddtelemetry-ffi 21.24% <ø> (ø)
dogstatsd-client 83.26% <ø> (ø)
datadog-ipc 82.39% <ø> (ø)
datadog-profiling 76.90% <ø> (ø)
datadog-profiling-ffi 62.12% <ø> (ø)
datadog-sidecar 37.69% <ø> (ø)
datdog-sidecar-ffi 15.88% <ø> (ø)
spawn-worker 55.18% <ø> (ø)
tinybytes 92.44% <ø> (ø)
datadog-trace-normalization 98.24% <ø> (ø)
datadog-trace-obfuscation 94.17% <ø> (ø)
datadog-trace-protobuf 59.65% <ø> (ø)
datadog-trace-utils 90.15% <ø> (ø)
datadog-tracer-flare 64.98% <ø> (ø)
datadog-log 75.57% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dd-oleksii dd-oleksii requested a review from bantonsson October 30, 2025 02:32
@dd-octo-sts
Copy link

dd-octo-sts bot commented Oct 30, 2025

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 71.36 MB 71.36 MB 0% (0 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 7.25 MB 7.25 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.20 MB 9.20 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 83.71 MB 83.71 MB 0% (0 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 18.61 MB 18.61 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 131.05 MB 131.05 MB +0% (+8.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 692.03 MB 692.03 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 5.93 MB 5.93 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 65.77 KB 65.77 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 17.51 MB 17.51 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 32.46 MB 32.46 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 15.85 MB 15.85 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 133.14 MB 133.15 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 680.66 MB 680.66 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 4.54 MB 4.54 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 66.79 KB 66.79 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 18.66 MB 18.66 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 30.52 MB 30.52 MB 0% (0 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 63.98 MB 63.98 MB 0% (0 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 8.56 MB 8.56 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 78.42 MB 78.42 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 9.91 MB 9.91 MB 0% (0 B) 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants