Skip to content

Sample type string api#1678

Closed
r1viollet wants to merge 2 commits intomainfrom
r1viollet/sample-type-string-api
Closed

Sample type string api#1678
r1viollet wants to merge 2 commits intomainfrom
r1viollet/sample-type-string-api

Conversation

@r1viollet
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds two C FFI functions that expose the pprof type and unit strings for a given ddog_prof_SampleType enum value:

  • ddog_prof_SampleType_type_str(SampleType) -> ddog_CharSlice — returns e.g. "cpu-time", "alloc-space", "tracepoint"
  • ddog_prof_SampleType_unit_str(SampleType) -> ddog_CharSlice — returns e.g. "nanoseconds", "bytes", "events"

Both return static string slices that are always valid and never need to be freed.

Motivation

Consumers of ddog_prof_SampleType (such as ddprof) need to know the exact pprof column name strings that libdatadog writes into profiles — for debug logging, integration tests, and static verification.
Without this API, they must maintain their own mapping table that can silently drift out of sync with libdatadog's internal Rust implementation.

Additional Notes

This PR is stacked on #1676 (feat(profiling)!: add Tracepoint sample type) due to the test covering SampleType::Tracepoint. It should be rebased onto main once that PR merges.

The returned slices point into static string literals defined in sample_type.rs — they have 'static lifetime and are safe to use without copying.

How to test the change?

The new sample_type_str_functions test in libdd-profiling-ffi/src/profiles/datatypes.rs covers all common sample types and verifies both the type and unit strings match expected values:

cargo test -p libdd-profiling-ffi -- sample_type_str

r1viollet and others added 2 commits March 6, 2026 09:44
ddprof uses "tracepoint"/"events" as the sample type for hardware
counters and perf tracepoint events. The v28 enum-based SampleType API
had no equivalent, causing those profiles to fall back to "sample"/"count"
and breaking the Datadog backend rendering.

Add `SampleType::Tracepoint` mapping to `ValueType::new("tracepoint", "events")`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add `ddog_prof_SampleType_type_str` and `ddog_prof_SampleType_unit_str`
functions that return the pprof column name strings (e.g. "cpu-time",
"nanoseconds") for a given SampleType enum value.

This allows consumers to verify or log the exact strings that libdatadog
writes into pprof profiles, without maintaining their own mapping table
that can drift out of sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/r1viollet/sample-type-string-api

Summary by Rule

Rule Base Branch PR Branch Change

Annotation Counts by File

File Base Branch PR Branch Change

Annotation Stats by Crate

Crate Base Branch PR Branch Change
clippy-annotation-reporter 5 5 No change (0%)
datadog-ffe-ffi 1 1 No change (0%)
datadog-ipc 27 27 No change (0%)
datadog-live-debugger 6 6 No change (0%)
datadog-live-debugger-ffi 10 10 No change (0%)
datadog-profiling-replayer 4 4 No change (0%)
datadog-remote-config 3 3 No change (0%)
datadog-sidecar 59 59 No change (0%)
libdd-common 10 10 No change (0%)
libdd-common-ffi 12 12 No change (0%)
libdd-crashtracker 12 12 No change (0%)
libdd-data-pipeline 5 5 No change (0%)
libdd-ddsketch 2 2 No change (0%)
libdd-dogstatsd-client 1 1 No change (0%)
libdd-profiling 13 13 No change (0%)
libdd-telemetry 19 19 No change (0%)
libdd-tinybytes 4 4 No change (0%)
libdd-trace-normalization 2 2 No change (0%)
libdd-trace-obfuscation 9 9 No change (0%)
libdd-trace-utils 15 15 No change (0%)
Total 219 219 No change (0%)

About This Report

This report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 71.18%. Comparing base (29b010a) to head (383bbf9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1678      +/-   ##
==========================================
+ Coverage   71.17%   71.18%   +0.01%     
==========================================
  Files         427      427              
  Lines       62807    62838      +31     
==========================================
+ Hits        44703    44733      +30     
- Misses      18104    18105       +1     
Components Coverage Δ
libdd-crashtracker 63.00% <ø> (ø)
libdd-crashtracker-ffi 16.56% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 88.02% <ø> (ø)
libdd-data-pipeline-ffi 75.72% <ø> (ø)
libdd-common 79.73% <ø> (ø)
libdd-common-ffi 73.40% <ø> (ø)
libdd-telemetry 62.48% <ø> (ø)
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 80.74% <ø> (ø)
libdd-profiling 81.65% <96.77%> (+0.04%) ⬆️
libdd-profiling-ffi 64.22% <100.00%> (+0.56%) ⬆️
datadog-sidecar 32.00% <ø> (ø)
datdog-sidecar-ffi 6.43% <ø> (ø)
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.67% <ø> (ø)
libdd-trace-protobuf 68.00% <ø> (ø)
libdd-trace-utils 89.07% <ø> (ø)
datadog-tracer-flare 88.95% <ø> (ø)
libdd-log 74.69% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

📚 Documentation Check Results

⚠️ 645 documentation warning(s) found

📦 libdd-profiling - 645 warning(s)


Updated: 2026-03-06 10:55:45 UTC | Commit: e8241ef | missing-docs job results

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 6, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-03-06 10:55:43

Comparing candidate commit 383bbf9 in PR branch r1viollet/sample-type-string-api with baseline commit 29b010a in branch main.

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

scenario:credit_card/is_card_number/ 378282246310005

  • 🟥 execution_time [+10.331µs; +10.537µs] or [+14.161%; +14.443%]
  • 🟥 throughput [-1730431.408op/s; -1698858.468op/s] or [-12.624%; -12.394%]

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 383bbf9 1772793515 r1viollet/sample-type-string-api
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 533.999µs 534.626µs ± 0.745µs 534.541µs ± 0.213µs 534.780µs 535.137µs 535.539µs 544.117µs 1.79% 10.443 130.352 0.14% 0.053µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1837840.657op/s 1870469.967op/s ± 2568.267op/s 1870765.092op/s ± 745.309op/s 1871471.326op/s 1872242.972op/s 1872611.716op/s 1872662.902op/s 0.10% -10.346 128.689 0.14% 181.604op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 380.279µs 381.440µs ± 0.490µs 381.491µs ± 0.375µs 381.772µs 382.321µs 382.521µs 382.578µs 0.29% 0.026 -0.599 0.13% 0.035µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2613846.376op/s 2621645.776op/s ± 3364.915op/s 2621296.004op/s ± 2572.452op/s 2624282.046op/s 2627018.792op/s 2627897.862op/s 2629644.774op/s 0.32% -0.021 -0.601 0.13% 237.935op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 189.908µs 190.313µs ± 0.181µs 190.301µs ± 0.118µs 190.425µs 190.625µs 190.775µs 190.885µs 0.31% 0.431 0.235 0.10% 0.013µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5238759.134op/s 5254505.109op/s ± 5004.747op/s 5254844.815op/s ± 3246.659op/s 5257719.242op/s 5262418.706op/s 5264356.698op/s 5265718.270op/s 0.21% -0.425 0.227 0.10% 353.889op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 37.455µs 37.612µs ± 0.073µs 37.608µs ± 0.051µs 37.656µs 37.727µs 37.797µs 37.915µs 0.82% 0.701 1.105 0.19% 0.005µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 26374984.458op/s 26587070.744op/s ± 51439.480op/s 26590158.761op/s ± 35819.472op/s 26629596.578op/s 26657966.650op/s 26679352.912op/s 26698446.293op/s 0.41% -0.685 1.058 0.19% 3637.321op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.798µs 45.922µs ± 0.112µs 45.902µs ± 0.033µs 45.945µs 46.041µs 46.106µs 47.255µs 2.95% 8.640 99.144 0.24% 0.008µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21161613.890op/s 21775962.011op/s ± 51962.173op/s 21785567.384op/s ± 15743.057op/s 21798424.519op/s 21813523.549op/s 21824593.838op/s 21834787.084op/s 0.23% -8.448 96.014 0.24% 3674.281op/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 [534.523µs; 534.729µs] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1870114.030op/s; 1870825.904op/s] or [-0.019%; +0.019%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [381.373µs; 381.508µs] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2621179.431op/s; 2622112.121op/s] or [-0.018%; +0.018%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [190.288µs; 190.338µs] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5253811.499op/s; 5255198.719op/s] or [-0.013%; +0.013%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [37.602µs; 37.623µs] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [26579941.726op/s; 26594199.761op/s] or [-0.027%; +0.027%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.907µs; 45.938µs] or [-0.034%; +0.034%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21768760.553op/s; 21783163.468op/s] or [-0.033%; +0.033%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.204µs 3.204µs ± 1.618µs 2.961µs ± 0.030µs 2.995µs 3.644µs 14.178µs 18.715µs 532.06% 7.734 62.540 50.38% 0.114µ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.980µs; 3.428µs] or [-7.000%; +7.000%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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 13.904ms 13.964ms ± 0.035ms 13.960ms ± 0.017ms 13.978ms 14.004ms 14.093ms 14.154ms 1.39% 2.144 7.324 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 [13.959ms; 13.969ms] or [-0.035%; +0.035%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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 91.300µs 91.506µs ± 0.180µs 91.486µs ± 0.066µs 91.552µs 91.674µs 91.911µs 93.422µs 2.12% 6.496 63.305 0.20% 0.013µ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 [91.481µs; 91.531µs] or [-0.027%; +0.027%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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 48.747ms 48.955ms ± 0.839ms 48.832ms ± 0.036ms 48.865ms 49.017ms 52.127ms 58.243ms 19.27% 8.740 84.167 1.71% 0.059ms 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 [48.839ms; 49.071ms] or [-0.237%; +0.237%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.568µs 185.863µs ± 0.137µs 185.841µs ± 0.067µs 185.912µs 186.146µs 186.273µs 186.403µs 0.30% 1.129 1.652 0.07% 0.010µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5364725.691op/s 5380298.437op/s ± 3969.100op/s 5380943.925op/s ± 1943.661op/s 5382790.040op/s 5385360.705op/s 5386377.302op/s 5388868.339op/s 0.15% -1.124 1.637 0.07% 280.658op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.892µs 17.955µs ± 0.034µs 17.951µs ± 0.022µs 17.974µs 18.016µs 18.064µs 18.086µs 0.75% 0.921 1.264 0.19% 0.002µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 55291042.994op/s 55695875.831op/s ± 105407.439op/s 55706266.625op/s ± 67402.202op/s 55772193.667op/s 55834155.462op/s 55876526.331op/s 55889796.884op/s 0.33% -0.908 1.225 0.19% 7453.431op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 10.141µs 10.274µs ± 0.049µs 10.273µs ± 0.035µs 10.307µs 10.345µs 10.387µs 10.471µs 1.92% 0.308 0.791 0.47% 0.003µs 1 200
normalization/normalize_name/normalize_name/good throughput 95505955.962op/s 97339014.227op/s ± 459549.983op/s 97342585.741op/s ± 329720.032op/s 97677505.794op/s 98053022.211op/s 98200721.356op/s 98609757.707op/s 1.30% -0.271 0.710 0.47% 32495.091op/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.844µs; 185.882µs] or [-0.010%; +0.010%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5379748.358op/s; 5380848.516op/s] or [-0.010%; +0.010%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.950µs; 17.959µs] or [-0.026%; +0.026%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [55681267.373op/s; 55710484.288op/s] or [-0.026%; +0.026%] None None None
normalization/normalize_name/normalize_name/good execution_time [10.267µs; 10.280µs] or [-0.066%; +0.066%] None None None
normalization/normalize_name/normalize_name/good throughput [97275325.019op/s; 97402703.435op/s] or [-0.065%; +0.065%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.590ms 10.615ms ± 0.015ms 10.613ms ± 0.009ms 10.623ms 10.634ms 10.662ms 10.713ms 0.94% 2.210 10.413 0.14% 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.612ms; 10.617ms] or [-0.020%; +0.020%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.970µs 33.647µs ± 1.135µs 33.171µs ± 0.144µs 33.291µs 36.052µs 36.080µs 37.715µs 13.70% 1.727 1.222 3.36% 0.080µ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.490µs; 33.805µs] or [-0.467%; +0.467%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.941µs 5.020µs ± 0.042µs 5.028µs ± 0.034µs 5.051µs 5.086µs 5.087µs 5.103µs 1.49% -0.065 -1.247 0.83% 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.015µs; 5.026µs] or [-0.116%; +0.116%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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 3.260ms 3.284ms ± 0.009ms 3.284ms ± 0.005ms 3.288ms 3.299ms 3.313ms 3.326ms 1.28% 1.012 3.019 0.27% 0.001ms 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 [3.283ms; 3.286ms] or [-0.038%; +0.038%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample_frames_x1000 execution_time 4.172ms 4.179ms ± 0.009ms 4.178ms ± 0.001ms 4.179ms 4.183ms 4.211ms 4.274ms 2.31% 7.479 70.281 0.21% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample_frames_x1000 execution_time [4.178ms; 4.180ms] or [-0.029%; +0.029%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.819µs 26.116µs ± 9.958µs 18.085µs ± 0.118µs 35.014µs 43.588µs 45.034µs 69.509µs 284.35% 0.951 0.757 38.03% 0.704µ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.736µs; 27.496µs] or [-5.284%; +5.284%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.836ns 249.467ns ± 12.092ns 244.288ns ± 2.562ns 251.446ns 282.017ns 289.224ns 290.381ns 18.87% 2.013 3.200 4.84% 0.855ns 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 [247.791ns; 251.143ns] or [-0.672%; +0.672%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.912µs ± 0.002µs 3.912µs ± 0.001µs 3.913µs 3.915µs 3.916µs 3.917µs 0.15% -1.931 14.928 0.06% 0.000µs 1 200
credit_card/is_card_number/ throughput 255268074.922op/s 255639715.873op/s ± 152748.666op/s 255640429.559op/s ± 85298.003op/s 255731222.085op/s 255829636.543op/s 255900616.520op/s 256798555.900op/s 0.45% 1.955 15.138 0.06% 10800.962op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 79.021µs 79.640µs ± 0.405µs 79.590µs ± 0.262µs 79.833µs 80.361µs 80.782µs 81.475µs 2.37% 1.125 1.839 0.51% 0.029µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 12273752.609op/s 12556791.337op/s ± 63466.122op/s 12564395.660op/s ± 41565.069op/s 12605955.999op/s 12633979.736op/s 12647607.502op/s 12654862.626op/s 0.72% -1.086 1.676 0.50% 4487.733op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 82.438µs 83.389µs ± 0.654µs 83.258µs ± 0.390µs 83.661µs 84.618µs 85.413µs 87.099µs 4.61% 1.644 5.040 0.78% 0.046µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 11481228.381op/s 11992709.906op/s ± 92873.667op/s 12010923.445op/s ± 56389.486op/s 12059887.291op/s 12104699.529op/s 12118499.647op/s 12130318.518op/s 0.99% -1.546 4.431 0.77% 6567.160op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.893µs 3.913µs ± 0.003µs 3.912µs ± 0.002µs 3.914µs 3.917µs 3.919µs 3.919µs 0.18% -1.391 10.762 0.07% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 255142045.542op/s 255585812.964op/s ± 186288.450op/s 255594785.867op/s ± 113634.987op/s 255698111.400op/s 255807166.718op/s 255891778.048op/s 256899242.228op/s 0.51% 1.414 10.951 0.07% 13172.583op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 69.140µs 69.652µs ± 0.304µs 69.575µs ± 0.194µs 69.827µs 70.213µs 70.522µs 70.786µs 1.74% 0.974 0.888 0.44% 0.022µs 1 200
credit_card/is_card_number/378282246310005 throughput 14127157.960op/s 14357309.603op/s ± 62481.429op/s 14373012.526op/s ± 40031.182op/s 14404946.302op/s 14434337.919op/s 14448606.130op/s 14463427.917op/s 0.63% -0.949 0.811 0.43% 4418.104op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 52.139µs 52.214µs ± 0.034µs 52.206µs ± 0.020µs 52.234µs 52.272µs 52.322µs 52.361µs 0.30% 1.041 1.975 0.06% 0.002µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 19098090.678op/s 19151795.730op/s ± 12434.714op/s 19155017.315op/s ± 7306.681op/s 19159928.925op/s 19167082.836op/s 19174150.528op/s 19179541.183op/s 0.13% -1.036 1.954 0.06% 879.267op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.029µs 6.037µs ± 0.011µs 6.034µs ± 0.002µs 6.038µs 6.069µs 6.081µs 6.108µs 1.22% 3.476 13.805 0.18% 0.001µs 1 200
credit_card/is_card_number/x371413321323331 throughput 163730719.126op/s 165634571.963op/s ± 292895.867op/s 165720827.083op/s ± 62431.002op/s 165773585.666op/s 165822240.777op/s 165848533.822op/s 165870617.913op/s 0.09% -3.456 13.622 0.18% 20710.865op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.893µs 3.912µs ± 0.003µs 3.912µs ± 0.001µs 3.913µs 3.918µs 3.921µs 3.922µs 0.26% -0.229 8.063 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254985484.981op/s 255617055.310op/s ± 200680.193op/s 255654109.193op/s ± 84296.433op/s 255729987.556op/s 255831951.328op/s 255883395.211op/s 256888552.982op/s 0.48% 0.252 8.192 0.08% 14190.233op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 64.080µs 64.450µs ± 0.146µs 64.436µs ± 0.098µs 64.538µs 64.736µs 64.855µs 64.869µs 0.67% 0.525 0.103 0.23% 0.010µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15415612.319op/s 15516038.583op/s ± 35179.545op/s 15519190.800op/s ± 23655.921op/s 15541913.267op/s 15566825.460op/s 15576563.490op/s 15605480.645op/s 0.56% -0.513 0.088 0.23% 2487.569op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 57.819µs 58.063µs ± 0.154µs 58.018µs ± 0.085µs 58.139µs 58.362µs 58.483µs 58.568µs 0.95% 1.041 0.557 0.26% 0.011µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 17074262.878op/s 17222833.935op/s ± 45440.857op/s 17236067.983op/s ± 25237.343op/s 17255868.979op/s 17273913.369op/s 17289366.125op/s 17295328.532op/s 0.34% -1.029 0.526 0.26% 3213.154op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.894µs 3.911µs ± 0.002µs 3.911µs ± 0.001µs 3.913µs 3.915µs 3.917µs 3.917µs 0.16% -1.984 17.985 0.06% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 255276700.176op/s 255657537.612op/s ± 149545.979op/s 255672579.117op/s ± 71562.322op/s 255739537.333op/s 255830387.802op/s 255895351.556op/s 256835572.802op/s 0.45% 2.012 18.232 0.06% 10574.498op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 54.578µs 54.888µs ± 0.241µs 54.850µs ± 0.176µs 55.040µs 55.319µs 55.642µs 55.658µs 1.47% 0.865 0.291 0.44% 0.017µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 17966735.032op/s 18219265.931op/s ± 79590.895op/s 18231597.806op/s ± 58311.733op/s 18287785.131op/s 18310287.181op/s 18315904.382op/s 18322435.823op/s 0.50% -0.845 0.230 0.44% 5627.926op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 52.152µs 52.223µs ± 0.038µs 52.215µs ± 0.025µs 52.249µs 52.292µs 52.322µs 52.391µs 0.34% 0.857 0.996 0.07% 0.003µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 19087149.139op/s 19148654.111op/s ± 14071.386op/s 19151605.807op/s ± 8991.383op/s 19159077.169op/s 19166335.482op/s 19172457.729op/s 19174857.926op/s 0.12% -0.852 0.977 0.07% 994.997op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.027µs 6.037µs ± 0.008µs 6.035µs ± 0.002µs 6.039µs 6.045µs 6.073µs 6.077µs 0.68% 3.330 13.210 0.12% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 164566342.347op/s 165642734.073op/s ± 205769.851op/s 165686869.642op/s ± 66118.375op/s 165748440.160op/s 165822208.403op/s 165877022.592op/s 165924747.917op/s 0.14% -3.315 13.115 0.12% 14550.126op/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.911µs; 3.912µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/ throughput [255618546.377op/s; 255660885.369op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [79.584µs; 79.696µs] or [-0.070%; +0.070%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12547995.542op/s; 12565587.131op/s] or [-0.070%; +0.070%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [83.298µs; 83.480µs] or [-0.109%; +0.109%] None None None
credit_card/is_card_number/ 378282246310005 throughput [11979838.509op/s; 12005581.303op/s] or [-0.107%; +0.107%] None None None
credit_card/is_card_number/37828224631 execution_time [3.912µs; 3.913µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/37828224631 throughput [255559995.176op/s; 255611630.751op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number/378282246310005 execution_time [69.610µs; 69.694µs] or [-0.061%; +0.061%] None None None
credit_card/is_card_number/378282246310005 throughput [14348650.277op/s; 14365968.928op/s] or [-0.060%; +0.060%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [52.210µs; 52.219µs] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [19150072.399op/s; 19153519.062op/s] or [-0.009%; +0.009%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.036µs; 6.039µs] or [-0.025%; +0.025%] None None None
credit_card/is_card_number/x371413321323331 throughput [165593979.413op/s; 165675164.513op/s] or [-0.025%; +0.025%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.912µs; 3.913µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ throughput [255589242.965op/s; 255644867.655op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [64.429µs; 64.470µs] or [-0.031%; +0.031%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15511163.036op/s; 15520914.130op/s] or [-0.031%; +0.031%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [58.042µs; 58.084µs] or [-0.037%; +0.037%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [17216536.270op/s; 17229131.601op/s] or [-0.037%; +0.037%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.911µs; 3.912µs] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255636811.978op/s; 255678263.247op/s] or [-0.008%; +0.008%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [54.855µs; 54.921µs] or [-0.061%; +0.061%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [18208235.398op/s; 18230296.464op/s] or [-0.061%; +0.061%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [52.218µs; 52.228µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [19146703.952op/s; 19150604.270op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.036µs; 6.038µs] or [-0.017%; +0.017%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [165614216.350op/s; 165671251.795op/s] or [-0.017%; +0.017%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.652µs 162.270µs ± 0.265µs 162.245µs ± 0.121µs 162.368µs 162.694µs 163.136µs 163.673µs 0.88% 1.748 7.333 0.16% 0.019µ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.233µs; 162.306µs] or [-0.023%; +0.023%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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.317µs 2.385µs ± 0.021µs 2.382µs ± 0.006µs 2.395µs 2.423µs 2.428µs 2.430µs 1.98% -0.621 1.821 0.89% 0.002µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.382µs; 2.388µs] or [-0.124%; +0.124%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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 144.913µs 146.494µs ± 1.605µs 146.268µs ± 0.487µs 146.696µs 148.218µs 152.787µs 161.922µs 10.70% 5.675 45.504 1.09% 0.114µ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 [146.272µs; 146.717µs] or [-0.152%; +0.152%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
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 188.753ns 191.416ns ± 2.046ns 191.146ns ± 1.546ns 192.767ns 194.868ns 197.678ns 200.424ns 4.85% 1.062 1.530 1.07% 0.145ns 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 [191.132ns; 191.700ns] or [-0.148%; +0.148%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 383bbf9 1772793515 r1viollet/sample-type-string-api
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
profile_add_sample2_frames_x1000 execution_time 720.134µs 721.593µs ± 0.701µs 721.497µs ± 0.365µs 721.910µs 722.614µs 724.110µs 724.982µs 0.48% 1.556 4.566 0.10% 0.050µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
profile_add_sample2_frames_x1000 execution_time [721.496µs; 721.690µs] or [-0.013%; +0.013%] None None None

Baseline

Omitted due to size.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

🔒 Cargo Deny Results

No issues found!

📦 libdd-profiling - ✅ No issues


Updated: 2026-03-06 10:58:30 UTC | Commit: e8241ef | dependency-check job results

@ivoanjo
Copy link
Copy Markdown
Member

ivoanjo commented Mar 6, 2026

Consumers of ddog_prof_SampleType (such as ddprof) need to know the exact pprof column name strings that libdatadog writes into profiles — for debug logging, integration tests, and static verification.
Without this API, they must maintain their own mapping table that can silently drift out of sync with libdatadog's internal Rust implementation.

TBH, changing this is a very big thing, so I do think it shouldn't be something that happens silently because the tests silently pick up the new name on it.

I think forcing a big search/replace when updating libdatadog if the profile type changes is actually a very loud way of making sure we're happy with such a change.

(So I actually kinda think this API is not that valuable)

@r1viollet
Copy link
Copy Markdown
Contributor Author

TBH, changing this is a very big thing, so I do think it shouldn't be something that happens silently because the tests silently pick up the new name on it.

I think forcing a big search/replace when updating libdatadog if the profile type changes is actually a very loud way of making sure we're happy with such a change.

(So I actually kinda think this API is not that valuable)

OK, I actually had static asserts on my side, so I'm agreeing already with this.

@r1viollet r1viollet closed this Mar 6, 2026
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