Skip to content

feat: process context publication#1585

Draft
yannham wants to merge 2 commits intomainfrom
yannham/process-context-sharing
Draft

feat: process context publication#1585
yannham wants to merge 2 commits intomainfrom
yannham/process-context-sharing

Conversation

@yannham
Copy link

@yannham yannham commented Feb 17, 2026

What does this PR do?

This PR implements the publication protocol of the process context sharing proposal.

This is intended as a minimally viable starting point. Next steps are kept for follow-up PRs, which could include for example:

  • expose the additional functions in the FFI
  • add the missing update protocol
  • add a function taking a structured object and encode it, instead of assuming a raw, already encoded payload

Motivation

This feature allows a process to expose data to an external process, typically an eBPF profiler. Please refer to the OTEP linked above for a detailed motivation.

Additional Notes

Some notes on dependencies:

  • This PR needs a handful of linux syscalls. I used rustix for that since it's already pulled as a transitive dependency (with the same major version bucket), and is nicely higher-level than libc.
  • I see that there's already a small MemFd wrapper crate used (e.g here
    pub enum AnonymousFileHandle {
    ). Unfortunately, it doesn't handle some options like NOEXEC, and doesn't really bring much over the basic rustix wrappers, so I didn't use that (question: should we take the occasion to kill a dependency and use rustix everywhere?)

There are a number of design choices or assumptions that might be interesting to discuss further:

  • on paper, a reader might be concurrently reading what the process is currently publishing, which could lead to race conditions (even more since the reader is another, uncontrolled process). However, the reader doesn't access the memory directly, but use /proc/<pid>/maps and syscalls to do so, so the concurrency model is a bit unclear. We basically settled on the mental model being that we use atomics as if the reader was another thread of the same program, which sounds like the best we can do and should prevent re-ordering at least on the writer side (using OS-level sync is another solution, but was deemed too costly for the upcoming thread-level context).
  • we must manage the following resources: the mmaped region and the payload, avoiding either leaking them or releasing them too early (nullifying the capacity to read, or worse making it read garbage). We settled with @ivoanjo on hiding that from the API user, by using a static. We use a mutex here instead of smarter lock-free style because it's mostly to please the Rust typesystem; we don't expect publications to happen often, and it should most likely be done from the same thread. The memory is guaranteed to be preserved, but the user can still free it explicitly if needed.
  • Regarding the payload, there might be room to make the internal interface safer (e.g. using Pin<Box<[u8]>> ?), and maybe offer the option - or do it automatically, depending on the size - of moving the payload directly after the header, as allowed by the spec. This is left for future work.

How to test the change?

TODO

Add an explicit rustix dependency (which was already pulled as a transitive dependency). Prep work for process context sharing.
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

📚 Documentation Check Results

No documentation warnings found!

📦 libdd-library-config - ✅ No warnings


Updated: 2026-02-19 16:55:01 UTC | Commit: 8ffd39d | missing-docs job results

@github-actions
Copy link

github-actions bot commented Feb 17, 2026

Clippy Allow Annotation Report

Comparing clippy allow annotations between branches:

  • Base Branch: origin/main
  • PR Branch: origin/yannham/process-context-sharing

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.

@github-actions
Copy link

github-actions bot commented Feb 17, 2026

🔒 Cargo Deny Results

No issues found!

📦 libdd-library-config - ✅ No issues


Updated: 2026-02-19 16:58:38 UTC | Commit: 8ffd39d | dependency-check job results

@pr-commenter
Copy link

pr-commenter bot commented Feb 17, 2026

Benchmarks

Comparison

Benchmark execution time: 2026-02-19 17:48:12

Comparing candidate commit 43208fe in PR branch yannham/process-context-sharing with baseline commit 27de9f3 in branch main.

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

scenario:profile_add_sample2_frames_x1000

  • 🟩 execution_time [-199.462µs; -199.225µs] or [-27.229%; -27.197%]

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 43208fe 1771521362 yannham/process-context-sharing
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.870µs 146.606µs ± 1.895µs 146.241µs ± 0.496µs 146.814µs 148.064µs 156.332µs 164.996µs 12.82% 6.236 50.109 1.29% 0.134µ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.343µs; 146.869µs] or [-0.179%; +0.179%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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 493.084µs 494.120µs ± 0.500µs 494.038µs ± 0.291µs 494.391µs 494.829µs 495.386µs 498.025µs 0.81% 2.585 17.256 0.10% 0.035µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 2007933.121op/s 2023803.748op/s ± 2042.354op/s 2024136.820op/s ± 1192.056op/s 2025094.123op/s 2026421.497op/s 2027310.739op/s 2028053.386op/s 0.19% -2.547 16.882 0.10% 144.416op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 371.585µs 372.483µs ± 0.310µs 372.490µs ± 0.193µs 372.671µs 373.034µs 373.207µs 373.294µs 0.22% 0.089 0.210 0.08% 0.022µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2678851.481op/s 2684686.561op/s ± 2237.138op/s 2684632.853op/s ± 1387.619op/s 2686064.569op/s 2688030.274op/s 2689874.574op/s 2691170.830op/s 0.24% -0.084 0.211 0.08% 158.190op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 167.718µs 168.025µs ± 0.149µs 168.014µs ± 0.095µs 168.107µs 168.270µs 168.381µs 168.751µs 0.44% 0.808 2.114 0.09% 0.011µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5925876.110op/s 5951514.835op/s ± 5290.164op/s 5951869.309op/s ± 3367.153op/s 5955408.533op/s 5959559.854op/s 5960942.959op/s 5962402.477op/s 0.18% -0.799 2.075 0.09% 374.071op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 38.738µs 38.863µs ± 0.047µs 38.864µs ± 0.033µs 38.893µs 38.937µs 38.979µs 39.001µs 0.35% 0.137 0.034 0.12% 0.003µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 25640683.135op/s 25731650.056op/s ± 31410.661op/s 25731066.597op/s ± 21660.957op/s 25753450.346op/s 25780907.350op/s 25812213.087op/s 25814733.071op/s 0.33% -0.130 0.032 0.12% 2221.069op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 45.602µs 45.731µs ± 0.102µs 45.718µs ± 0.028µs 45.749µs 45.819µs 45.885µs 46.995µs 2.79% 9.574 115.406 0.22% 0.007µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 21279010.384op/s 21867040.075op/s ± 47839.350op/s 21873076.184op/s ± 13313.772op/s 21885661.538op/s 21901719.477op/s 21919534.197op/s 21928821.404op/s 0.25% -9.403 112.552 0.22% 3382.753op/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 [494.050µs; 494.189µs] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [2023520.698op/s; 2024086.799op/s] or [-0.014%; +0.014%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [372.440µs; 372.526µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2684376.515op/s; 2684996.607op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [168.004µs; 168.045µs] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5950781.669op/s; 5952248.001op/s] or [-0.012%; +0.012%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [38.856µs; 38.869µs] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [25727296.840op/s; 25736003.271op/s] or [-0.017%; +0.017%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [45.717µs; 45.745µs] or [-0.031%; +0.031%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [21860410.001op/s; 21873670.149op/s] or [-0.030%; +0.030%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.016ms 4.021ms ± 0.007ms 4.020ms ± 0.001ms 4.022ms 4.024ms 4.027ms 4.108ms 2.20% 11.698 151.919 0.16% 0.000ms 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.020ms; 4.022ms] or [-0.023%; +0.023%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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 241.884ns 251.156ns ± 12.611ns 245.704ns ± 2.297ns 251.588ns 285.976ns 293.748ns 294.866ns 20.01% 2.226 4.090 5.01% 0.892ns 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 [249.409ns; 252.904ns] or [-0.696%; +0.696%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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 34.531µs 35.129µs ± 0.932µs 34.706µs ± 0.080µs 34.840µs 37.118µs 37.154µs 38.330µs 10.44% 1.722 1.149 2.65% 0.066µ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 [35.000µs; 35.259µs] or [-0.368%; +0.368%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.816ms 49.123ms ± 0.878ms 48.976ms ± 0.071ms 49.075ms 49.251ms 53.850ms 57.487ms 17.38% 7.577 60.900 1.78% 0.062ms 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 [49.002ms; 49.245ms] or [-0.248%; +0.248%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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 9.601ms 9.939ms ± 0.098ms 9.958ms ± 0.046ms 9.998ms 10.057ms 10.101ms 10.167ms 2.09% -1.079 1.380 0.98% 0.007ms 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 [9.926ms; 9.953ms] or [-0.137%; +0.137%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.156µs 3.200µs ± 1.420µs 2.982µs ± 0.029µs 3.008µs 3.648µs 14.111µs 14.631µs 390.65% 7.312 54.745 44.28% 0.100µ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.003µs; 3.397µs] or [-6.152%; +6.152%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.933µs 5.017µs ± 0.039µs 5.034µs ± 0.022µs 5.050µs 5.058µs 5.061µs 5.064µs 0.60% -0.598 -1.238 0.78% 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.011µs; 5.022µs] or [-0.108%; +0.108%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.393µs 2.430µs ± 0.015µs 2.428µs ± 0.008µs 2.437µs 2.457µs 2.474µs 2.482µs 2.21% 0.752 1.425 0.60% 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.428µs; 2.432µs] or [-0.083%; +0.083%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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 532.524µs 533.184µs ± 0.402µs 533.111µs ± 0.251µs 533.403µs 533.966µs 534.266µs 534.293µs 0.22% 0.833 0.031 0.08% 0.028µ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 [533.128µs; 533.240µs] or [-0.010%; +0.010%] None None None

Group 12

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.896µs 3.913µs ± 0.003µs 3.913µs ± 0.001µs 3.915µs 3.918µs 3.920µs 3.926µs 0.32% -1.121 9.672 0.08% 0.000µs 1 200
credit_card/is_card_number/ throughput 254739236.121op/s 255542727.133op/s ± 202199.061op/s 255556683.142op/s ± 87334.464op/s 255634191.073op/s 255775618.100op/s 255872472.584op/s 256692508.988op/s 0.44% 1.146 9.782 0.08% 14297.633op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 78.710µs 80.916µs ± 0.901µs 80.860µs ± 0.576µs 81.438µs 82.562µs 83.294µs 83.530µs 3.30% 0.353 0.173 1.11% 0.064µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 11971754.769op/s 12359982.371op/s ± 137089.856op/s 12367030.751op/s ± 88108.364op/s 12453217.164op/s 12574232.190op/s 12653690.125op/s 12704846.438op/s 2.73% -0.285 0.125 1.11% 9693.717op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 71.818µs 72.475µs ± 0.494µs 72.375µs ± 0.335µs 72.745µs 73.376µs 74.086µs 74.193µs 2.51% 1.122 1.168 0.68% 0.035µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 13478431.579op/s 13798400.272op/s ± 93327.112op/s 13816978.327op/s ± 63949.553op/s 13874957.029op/s 13899194.247op/s 13914589.710op/s 13924019.852op/s 0.77% -1.083 1.033 0.67% 6599.223op/s 1 200
credit_card/is_card_number/37828224631 execution_time 3.897µs 3.914µs ± 0.003µs 3.913µs ± 0.002µs 3.915µs 3.918µs 3.920µs 3.934µs 0.53% 0.920 12.200 0.08% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 254194861.901op/s 255524582.349op/s ± 202610.076op/s 255534126.583op/s ± 110332.247op/s 255656372.262op/s 255753294.240op/s 255812397.133op/s 256631436.678op/s 0.43% -0.888 12.121 0.08% 14326.696op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 68.609µs 69.054µs ± 0.264µs 69.005µs ± 0.192µs 69.213µs 69.540µs 69.809µs 69.999µs 1.44% 0.839 0.522 0.38% 0.019µs 1 200
credit_card/is_card_number/378282246310005 throughput 14285995.783op/s 14481602.328op/s ± 55117.067op/s 14491724.501op/s ± 40342.364op/s 14523666.315op/s 14550315.575op/s 14565773.938op/s 14575385.351op/s 0.58% -0.819 0.464 0.38% 3897.365op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 45.531µs 45.787µs ± 0.087µs 45.789µs ± 0.053µs 45.843µs 45.921µs 45.947µs 45.981µs 0.42% -0.368 0.079 0.19% 0.006µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 21747921.137op/s 21840152.069op/s ± 41585.400op/s 21839459.925op/s ± 25492.184op/s 21864518.262op/s 21908001.607op/s 21946674.674op/s 21962954.613op/s 0.57% 0.379 0.093 0.19% 2940.532op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 6.428µs 6.437µs ± 0.007µs 6.436µs ± 0.003µs 6.439µs 6.443µs 6.450µs 6.502µs 1.02% 6.130 51.012 0.11% 0.000µs 1 200
credit_card/is_card_number/x371413321323331 throughput 153794706.236op/s 155353039.542op/s ± 166647.403op/s 155365361.293op/s ± 61302.152op/s 155427331.899op/s 155503562.269op/s 155533428.722op/s 155562952.192op/s 0.13% -6.080 50.418 0.11% 11783.751op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 3.898µs 3.913µs ± 0.003µs 3.913µs ± 0.001µs 3.915µs 3.918µs 3.919µs 3.934µs 0.53% 1.453 17.514 0.07% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 254185938.207op/s 255526292.521op/s ± 181904.529op/s 255542835.068op/s ± 92627.171op/s 255630279.411op/s 255726875.055op/s 255756204.533op/s 256519880.291op/s 0.38% -1.416 17.352 0.07% 12862.593op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 61.338µs 62.883µs ± 0.650µs 62.826µs ± 0.404µs 63.285µs 64.050µs 64.373µs 64.641µs 2.89% 0.183 -0.070 1.03% 0.046µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 15470039.527op/s 15904213.079op/s ± 164233.897op/s 15916889.663op/s ± 102602.309op/s 16014426.828op/s 16183537.597op/s 16248759.785op/s 16303122.512op/s 2.43% -0.124 -0.080 1.03% 11613.090op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 53.863µs 54.028µs ± 0.060µs 54.027µs ± 0.037µs 54.067µs 54.126µs 54.162µs 54.210µs 0.34% 0.014 0.117 0.11% 0.004µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 18446746.277op/s 18509057.156op/s ± 20533.496op/s 18509415.845op/s ± 12746.233op/s 18521464.361op/s 18545818.207op/s 18553806.216op/s 18565583.122op/s 0.30% -0.007 0.116 0.11% 1451.937op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 3.894µs 3.914µs ± 0.003µs 3.913µs ± 0.002µs 3.916µs 3.919µs 3.920µs 3.927µs 0.34% -0.768 7.846 0.08% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 254674284.443op/s 255502825.522op/s ± 202453.400op/s 255535311.272op/s ± 114591.590op/s 255623280.890op/s 255751012.094op/s 255895516.334op/s 256787952.426op/s 0.49% 0.790 7.961 0.08% 14315.617op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 50.205µs 50.385µs ± 0.114µs 50.371µs ± 0.054µs 50.424µs 50.552µs 50.881µs 50.900µs 1.05% 2.160 6.691 0.23% 0.008µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 19646359.604op/s 19847270.823op/s ± 44862.332op/s 19852843.541op/s ± 21249.662op/s 19874993.286op/s 19897786.968op/s 19910514.592op/s 19918518.246op/s 0.33% -2.132 6.558 0.23% 3172.246op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 45.516µs 45.751µs ± 0.085µs 45.759µs ± 0.049µs 45.807µs 45.875µs 45.935µs 45.968µs 0.46% -0.434 0.315 0.18% 0.006µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 21754263.836op/s 21857317.876op/s ± 40497.944op/s 21853540.466op/s ± 23393.588op/s 21877698.431op/s 21945010.107op/s 21954004.993op/s 21970274.119op/s 0.53% 0.445 0.323 0.18% 2863.637op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 6.429µs 6.439µs ± 0.011µs 6.436µs ± 0.002µs 6.439µs 6.447µs 6.492µs 6.500µs 0.99% 4.182 18.340 0.16% 0.001µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 153851003.630op/s 155311365.559op/s ± 254070.963op/s 155370581.361op/s ± 59953.208op/s 155418444.511op/s 155474553.292op/s 155519833.225op/s 155541413.402op/s 0.11% -4.168 18.240 0.16% 17965.530op/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.011%; +0.011%] None None None
credit_card/is_card_number/ throughput [255514704.288op/s; 255570749.979op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [80.791µs; 81.041µs] or [-0.154%; +0.154%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [12340983.035op/s; 12378981.706op/s] or [-0.154%; +0.154%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [72.407µs; 72.544µs] or [-0.094%; +0.094%] None None None
credit_card/is_card_number/ 378282246310005 throughput [13785466.032op/s; 13811334.513op/s] or [-0.094%; +0.094%] None None None
credit_card/is_card_number/37828224631 execution_time [3.913µs; 3.914µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/37828224631 throughput [255496502.541op/s; 255552662.157op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number/378282246310005 execution_time [69.018µs; 69.091µs] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/378282246310005 throughput [14473963.633op/s; 14489241.024op/s] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [45.775µs; 45.799µs] or [-0.026%; +0.026%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [21834388.733op/s; 21845915.406op/s] or [-0.026%; +0.026%] None None None
credit_card/is_card_number/x371413321323331 execution_time [6.436µs; 6.438µs] or [-0.015%; +0.015%] None None None
credit_card/is_card_number/x371413321323331 throughput [155329943.814op/s; 155376135.269op/s] or [-0.015%; +0.015%] None None None
credit_card/is_card_number_no_luhn/ execution_time [3.913µs; 3.914µs] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ throughput [255501082.303op/s; 255551502.739op/s] or [-0.010%; +0.010%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [62.793µs; 62.973µs] or [-0.143%; +0.143%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [15881451.841op/s; 15926974.318op/s] or [-0.143%; +0.143%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [54.019µs; 54.036µs] or [-0.015%; +0.015%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [18506211.411op/s; 18511902.901op/s] or [-0.015%; +0.015%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [3.913µs; 3.914µs] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [255474767.427op/s; 255530883.616op/s] or [-0.011%; +0.011%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [50.369µs; 50.401µs] or [-0.031%; +0.031%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [19841053.336op/s; 19853488.311op/s] or [-0.031%; +0.031%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [45.740µs; 45.763µs] or [-0.026%; +0.026%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [21851705.250op/s; 21862930.501op/s] or [-0.026%; +0.026%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [6.437µs; 6.440µs] or [-0.023%; +0.023%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [155276153.767op/s; 155346577.351op/s] or [-0.023%; +0.023%] None None None

Group 13

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.225ns 191.075ns ± 2.260ns 190.887ns ± 1.371ns 192.068ns 195.347ns 198.876ns 202.562ns 6.12% 1.464 3.579 1.18% 0.160ns 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 [190.762ns; 191.389ns] or [-0.164%; +0.164%] None None None

Group 14

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.908µs 186.420µs ± 0.308µs 186.412µs ± 0.196µs 186.577µs 186.848µs 187.601µs 187.848µs 0.77% 1.485 4.092 0.16% 0.022µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 5323451.588op/s 5364246.563op/s ± 8841.209op/s 5364475.905op/s ± 5626.948op/s 5371138.630op/s 5374953.245op/s 5378048.705op/s 5379007.562op/s 0.27% -1.466 4.007 0.16% 625.168op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 17.439µs 17.600µs ± 0.058µs 17.598µs ± 0.035µs 17.637µs 17.692µs 17.738µs 17.771µs 0.98% 0.072 0.073 0.33% 0.004µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 56272650.924op/s 56820140.669op/s ± 186349.674op/s 56825005.524op/s ± 114441.773op/s 56934005.721op/s 57119374.448op/s 57230629.187op/s 57341494.136op/s 0.91% -0.051 0.068 0.33% 13176.912op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 9.884µs 9.942µs ± 0.023µs 9.939µs ± 0.012µs 9.955µs 9.984µs 10.003µs 10.020µs 0.81% 0.513 0.549 0.23% 0.002µs 1 200
normalization/normalize_name/normalize_name/good throughput 99804398.501op/s 100581305.276op/s ± 230781.339op/s 100614970.898op/s ± 124440.613op/s 100716306.580op/s 100905091.919op/s 101062305.857op/s 101168573.669op/s 0.55% -0.498 0.530 0.23% 16318.705op/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 [186.377µs; 186.463µs] or [-0.023%; +0.023%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [5363021.256op/s; 5365471.869op/s] or [-0.023%; +0.023%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [17.592µs; 17.608µs] or [-0.045%; +0.045%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [56794314.396op/s; 56845966.941op/s] or [-0.045%; +0.045%] None None None
normalization/normalize_name/normalize_name/good execution_time [9.939µs; 9.945µs] or [-0.032%; +0.032%] None None None
normalization/normalize_name/normalize_name/good throughput [100549321.202op/s; 100613289.350op/s] or [-0.032%; +0.032%] None None None

Group 15

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.471µs 162.461µs ± 0.333µs 162.432µs ± 0.151µs 162.582µs 162.781µs 163.137µs 165.878µs 2.12% 5.488 54.134 0.20% 0.024µ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.415µs; 162.507µs] or [-0.028%; +0.028%] None None None

Group 16

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.626µs 25.079µs ± 9.011µs 17.945µs ± 0.204µs 33.185µs 41.990µs 42.796µs 59.558µs 231.88% 0.865 -0.003 35.84% 0.637µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [23.831µs; 26.328µs] or [-4.980%; +4.980%] None None None

Group 17

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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 89.675µs 89.976µs ± 0.282µs 89.947µs ± 0.051µs 90.001µs 90.126µs 90.554µs 93.614µs 4.08% 10.905 137.076 0.31% 0.020µ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 [89.936µs; 90.015µs] or [-0.043%; +0.043%] None None None

Group 18

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.941ms 14.994ms ± 0.036ms 14.989ms ± 0.014ms 15.003ms 15.066ms 15.116ms 15.218ms 1.52% 2.445 9.141 0.24% 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.989ms; 14.999ms] or [-0.034%; +0.034%] None None None

Group 19

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 43208fe 1771521362 yannham/process-context-sharing
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.627ms 10.657ms ± 0.014ms 10.656ms ± 0.008ms 10.664ms 10.678ms 10.706ms 10.731ms 0.71% 1.312 4.500 0.13% 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.655ms; 10.659ms] or [-0.018%; +0.018%] None None None

Baseline

Omitted due to size.

@codecov-commenter
Copy link

codecov-commenter commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 0% with 122 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.05%. Comparing base (a0cef26) to head (43208fe).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1585      +/-   ##
==========================================
+ Coverage   70.82%   71.05%   +0.22%     
==========================================
  Files         423      424       +1     
  Lines       61862    62139     +277     
==========================================
+ Hits        43816    44153     +337     
+ Misses      18046    17986      -60     
Components Coverage Δ
libdd-crashtracker 62.44% <ø> (+0.03%) ⬆️
libdd-crashtracker-ffi 15.80% <ø> (ø)
libdd-alloc 98.77% <ø> (ø)
libdd-data-pipeline 87.25% <ø> (+1.28%) ⬆️
libdd-data-pipeline-ffi 76.92% <ø> (+1.29%) ⬆️
libdd-common 80.58% <ø> (+0.72%) ⬆️
libdd-common-ffi 73.75% <ø> (ø)
libdd-telemetry 62.52% <ø> (ø)
libdd-telemetry-ffi 16.75% <ø> (ø)
libdd-dogstatsd-client 82.64% <ø> (ø)
datadog-ipc 80.71% <ø> (ø)
libdd-profiling 81.54% <ø> (+0.32%) ⬆️
libdd-profiling-ffi 63.66% <ø> (ø)
datadog-sidecar 32.64% <ø> (-0.13%) ⬇️
datdog-sidecar-ffi 8.88% <ø> (-0.62%) ⬇️
spawn-worker 54.69% <ø> (ø)
libdd-tinybytes 93.16% <ø> (ø)
libdd-trace-normalization 81.71% <ø> (ø)
libdd-trace-obfuscation 94.21% <ø> (+0.02%) ⬆️
libdd-trace-protobuf 68.00% <ø> (ø)
libdd-trace-utils 89.16% <ø> (+0.44%) ⬆️
datadog-tracer-flare 90.45% <ø> (+1.49%) ⬆️
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.

@yannham yannham force-pushed the yannham/process-context-sharing branch from 6598cc3 to 43208fe Compare February 19, 2026 17:29
}

/// Locks the context handle. Returns a uniform error if the lock has been poisoned.
fn lock_context_handle<'a>() -> anyhow::Result<MutexGuard<'a, Option<ProcessContextHandle>>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is equivalent to this, since the lifetime is unbounded https://doc.rust-lang.org/nomicon/unbounded-lifetimes.html

Suggested change
fn lock_context_handle<'a>() -> anyhow::Result<MutexGuard<'a, Option<ProcessContextHandle>>> {
fn lock_context_handle() -> anyhow::Result<MutexGuard<'static, Option<ProcessContextHandle>>> {

rand = "0.8.3"
rmp = "0.8.14"
rmp-serde = "1.3.0"
rustix = { version = "1.1.3", features = ["param", "mm", "process"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

why rustix rather than the libc crate?

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

Comments