Skip to content

feat(shared-runtime): add block_on_with_timeout to BlockingRuntime - #2333

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
mainfrom
brettlangdon/block_on_timeout
Aug 13, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 5 commits into
mainfrom
brettlangdon/block_on_timeout

Conversation

@brettlangdon

Copy link
Copy Markdown
Member

What does this PR do?

Lets consumers bound a block_on wait with a deadline without adding tokio as a direct dependency — the executor is whatever the runtime already runs on.

Returns BlockOnTimeoutError::TimedOut/Io to distinguish a timeout from an executor failure.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

How to test the change?

Describe here in detail how the change can be validated.

@pr-commenter

pr-commenter Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Benchmarks

Comparison

Benchmark execution time: 2026-08-12 18:32:02

Comparing candidate commit 376b5d2 in PR branch brettlangdon/block_on_timeout with baseline commit 3da894a in branch main.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:trace_buffer/4_senders/no_delay

  • 🟩 execution_time [-145.941µs; -114.203µs] or [-6.018%; -4.709%]
  • 🟩 throughput [+74972.314op/s; +96338.006op/s] or [+5.047%; +6.485%]

Benchmark execution time: 2026-08-12 18:29:44

Comparing candidate commit 376b5d2 in PR branch brettlangdon/block_on_timeout with baseline commit 3da894a in branch main.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

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 376b5d2 1786558634 brettlangdon/block_on_timeout
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 9.485ms 9.518ms ± 0.016ms 9.516ms ± 0.012ms 9.529ms 9.542ms 9.558ms 9.568ms 0.55% 0.380 -0.158 0.17% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [9.515ms; 9.520ms] or [-0.023%; +0.023%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 376b5d2 1786558634 brettlangdon/block_on_timeout
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
trace_buffer/1_senders/10us_delay execution_time 56.346ms 56.618ms ± 0.144ms 56.600ms ± 0.078ms 56.685ms 56.871ms 57.026ms 57.224ms 1.10% 1.018 1.827 0.25% 0.010ms 1 200
trace_buffer/1_senders/10us_delay throughput 15727.748op/s 15896.234op/s ± 40.346op/s 15901.139op/s ± 22.052op/s 15920.154op/s 15953.182op/s 15961.814op/s 15972.733op/s 0.45% -0.996 1.756 0.25% 2.853op/s 1 200
trace_buffer/1_senders/1us_delay execution_time 49.974ms 50.079ms ± 0.034ms 50.081ms ± 0.012ms 50.089ms 50.143ms 50.197ms 50.207ms 0.25% 0.911 2.783 0.07% 0.002ms 1 200
trace_buffer/1_senders/1us_delay throughput 17925.682op/s 17971.515op/s ± 12.075op/s 17970.943op/s ± 4.415op/s 17977.122op/s 17988.751op/s 17995.240op/s 18009.335op/s 0.21% -0.903 2.768 0.07% 0.854op/s 1 200
trace_buffer/1_senders/no_delay execution_time 327.903µs 337.809µs ± 3.657µs 337.607µs ± 2.554µs 340.117µs 344.079µs 349.102µs 350.361µs 3.78% 0.640 1.076 1.08% 0.259µs 1 200
trace_buffer/1_senders/no_delay throughput 2568775.779op/s 2664540.062op/s ± 28662.975op/s 2665824.549op/s ± 20168.677op/s 2686109.073op/s 2704721.986op/s 2717980.500op/s 2744716.121op/s 2.96% -0.555 0.905 1.07% 2026.778op/s 1 200
trace_buffer/2_senders/10us_delay execution_time 56.758ms 57.271ms ± 0.191ms 57.285ms ± 0.139ms 57.402ms 57.606ms 57.670ms 57.695ms 0.72% 0.052 -0.579 0.33% 0.013ms 1 200
trace_buffer/2_senders/10us_delay throughput 31198.498op/s 31429.620op/s ± 104.683op/s 31421.849op/s ± 76.195op/s 31512.960op/s 31598.047op/s 31642.639op/s 31713.640op/s 0.93% -0.038 -0.577 0.33% 7.402op/s 1 200
trace_buffer/2_senders/1us_delay execution_time 50.046ms 50.113ms ± 0.033ms 50.108ms ± 0.016ms 50.125ms 50.185ms 50.217ms 50.229ms 0.24% 1.257 1.907 0.07% 0.002ms 1 200
trace_buffer/2_senders/1us_delay throughput 35835.831op/s 35918.840op/s ± 23.560op/s 35922.685op/s ± 11.820op/s 35934.295op/s 35949.111op/s 35955.286op/s 35967.053op/s 0.12% -1.253 1.895 0.07% 1.666op/s 1 200
trace_buffer/2_senders/no_delay execution_time 822.396µs 875.956µs ± 16.842µs 874.781µs ± 10.879µs 887.396µs 904.315µs 913.437µs 916.559µs 4.78% -0.065 0.215 1.92% 1.191µs 1 200
trace_buffer/2_senders/no_delay throughput 1963867.254op/s 2055654.335op/s ± 39622.367op/s 2057658.097op/s ± 25911.214op/s 2080942.629op/s 2119735.079op/s 2152102.005op/s 2188725.618op/s 6.37% 0.195 0.343 1.92% 2801.724op/s 1 200
trace_buffer/4_senders/10us_delay execution_time 57.090ms 57.463ms ± 0.176ms 57.439ms ± 0.104ms 57.555ms 57.758ms 58.006ms 58.493ms 1.84% 1.472 5.519 0.31% 0.012ms 1 200
trace_buffer/4_senders/10us_delay throughput 61545.329op/s 62649.686op/s ± 190.751op/s 62674.836op/s ± 114.154op/s 62773.183op/s 62899.971op/s 62971.685op/s 63057.844op/s 0.61% -1.424 5.220 0.30% 13.488op/s 1 200
trace_buffer/4_senders/1us_delay execution_time 50.069ms 50.169ms ± 0.036ms 50.162ms ± 0.014ms 50.180ms 50.245ms 50.276ms 50.317ms 0.31% 1.289 2.694 0.07% 0.003ms 1 200
trace_buffer/4_senders/1us_delay throughput 71546.292op/s 71757.568op/s ± 51.718op/s 71767.447op/s ± 20.707op/s 71784.598op/s 71826.436op/s 71845.780op/s 71900.551op/s 0.19% -1.282 2.676 0.07% 3.657op/s 1 200
trace_buffer/4_senders/no_delay execution_time 2.038ms 2.295ms ± 0.093ms 2.310ms ± 0.060ms 2.363ms 2.441ms 2.485ms 2.525ms 9.32% -0.393 -0.006 4.06% 0.007ms 1 200
trace_buffer/4_senders/no_delay throughput 1425693.098op/s 1571212.461op/s ± 65275.404op/s 1558611.982op/s ± 39553.444op/s 1607835.805op/s 1694922.692op/s 1745198.383op/s 1766603.141op/s 13.34% 0.619 0.236 4.14% 4615.668op/s 1 200
trace_buffer/8_senders/10us_delay execution_time 57.593ms 57.900ms ± 0.206ms 57.840ms ± 0.103ms 58.000ms 58.307ms 58.463ms 58.663ms 1.42% 1.175 0.894 0.36% 0.015ms 1 200
trace_buffer/8_senders/10us_delay throughput 122734.896op/s 124354.770op/s ± 441.626op/s 124480.548op/s ± 221.658op/s 124677.770op/s 124836.103op/s 124960.533op/s 125015.232op/s 0.43% -1.159 0.845 0.35% 31.228op/s 1 200
trace_buffer/8_senders/1us_delay execution_time 50.203ms 50.286ms ± 0.058ms 50.269ms ± 0.024ms 50.307ms 50.393ms 50.499ms 50.581ms 0.62% 1.974 5.195 0.11% 0.004ms 1 200
trace_buffer/8_senders/1us_delay throughput 142344.761op/s 143181.520op/s ± 163.526op/s 143230.040op/s ± 68.759op/s 143280.354op/s 143347.364op/s 143396.666op/s 143417.221op/s 0.13% -1.963 5.131 0.11% 11.563op/s 1 200
trace_buffer/8_senders/no_delay execution_time 5.396ms 6.367ms ± 0.190ms 6.410ms ± 0.088ms 6.493ms 6.556ms 6.605ms 6.641ms 3.59% -1.938 5.048 2.98% 0.013ms 1 200
trace_buffer/8_senders/no_delay throughput 1084245.853op/s 1131904.230op/s ± 36014.587op/s 1123186.259op/s ± 15172.854op/s 1141172.669op/s 1205383.711op/s 1273902.191op/s 1334354.444op/s 18.80% 2.270 7.094 3.17% 2546.616op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
trace_buffer/1_senders/10us_delay execution_time [56.598ms; 56.638ms] or [-0.035%; +0.035%] None None None
trace_buffer/1_senders/10us_delay throughput [15890.643op/s; 15901.826op/s] or [-0.035%; +0.035%] None None None
trace_buffer/1_senders/1us_delay execution_time [50.075ms; 50.084ms] or [-0.009%; +0.009%] None None None
trace_buffer/1_senders/1us_delay throughput [17969.842op/s; 17973.189op/s] or [-0.009%; +0.009%] None None None
trace_buffer/1_senders/no_delay execution_time [337.302µs; 338.315µs] or [-0.150%; +0.150%] None None None
trace_buffer/1_senders/no_delay throughput [2660567.649op/s; 2668512.474op/s] or [-0.149%; +0.149%] None None None
trace_buffer/2_senders/10us_delay execution_time [57.245ms; 57.298ms] or [-0.046%; +0.046%] None None None
trace_buffer/2_senders/10us_delay throughput [31415.112op/s; 31444.128op/s] or [-0.046%; +0.046%] None None None
trace_buffer/2_senders/1us_delay execution_time [50.108ms; 50.118ms] or [-0.009%; +0.009%] None None None
trace_buffer/2_senders/1us_delay throughput [35915.575op/s; 35922.105op/s] or [-0.009%; +0.009%] None None None
trace_buffer/2_senders/no_delay execution_time [873.622µs; 878.291µs] or [-0.266%; +0.266%] None None None
trace_buffer/2_senders/no_delay throughput [2050163.056op/s; 2061145.614op/s] or [-0.267%; +0.267%] None None None
trace_buffer/4_senders/10us_delay execution_time [57.439ms; 57.487ms] or [-0.042%; +0.042%] None None None
trace_buffer/4_senders/10us_delay throughput [62623.249op/s; 62676.122op/s] or [-0.042%; +0.042%] None None None
trace_buffer/4_senders/1us_delay execution_time [50.164ms; 50.174ms] or [-0.010%; +0.010%] None None None
trace_buffer/4_senders/1us_delay throughput [71750.400op/s; 71764.736op/s] or [-0.010%; +0.010%] None None None
trace_buffer/4_senders/no_delay execution_time [2.282ms; 2.308ms] or [-0.564%; +0.564%] None None None
trace_buffer/4_senders/no_delay throughput [1562165.918op/s; 1580259.004op/s] or [-0.576%; +0.576%] None None None
trace_buffer/8_senders/10us_delay execution_time [57.871ms; 57.928ms] or [-0.049%; +0.049%] None None None
trace_buffer/8_senders/10us_delay throughput [124293.565op/s; 124415.975op/s] or [-0.049%; +0.049%] None None None
trace_buffer/8_senders/1us_delay execution_time [50.278ms; 50.294ms] or [-0.016%; +0.016%] None None None
trace_buffer/8_senders/1us_delay throughput [143158.857op/s; 143204.183op/s] or [-0.016%; +0.016%] None None None
trace_buffer/8_senders/no_delay execution_time [6.341ms; 6.393ms] or [-0.413%; +0.413%] None None None
trace_buffer/8_senders/no_delay throughput [1126912.955op/s; 1136895.506op/s] or [-0.441%; +0.441%] None None None

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 376b5d2 1786558634 brettlangdon/block_on_timeout
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/2644 execution_time 4.030ms 4.076ms ± 0.019ms 4.071ms ± 0.010ms 4.084ms 4.114ms 4.128ms 4.154ms 2.04% 1.061 1.755 0.46% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2644 execution_time [4.073ms; 4.078ms] or [-0.064%; +0.064%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 376b5d2 1786558634 brettlangdon/block_on_timeout
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 14.935µs 15.355µs ± 0.186µs 15.328µs ± 0.109µs 15.443µs 15.733µs 15.872µs 16.294µs 6.30% 1.223 3.004 1.21% 0.013µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [15.329µs; 15.380µs] or [-0.168%; +0.168%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 376b5d2 1786558634 brettlangdon/block_on_timeout
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.061µs 1.080µs ± 0.008µs 1.080µs ± 0.006µs 1.088µs 1.091µs 1.097µs 1.098µs 1.71% -0.040 -0.834 0.72% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [1.079µs; 1.081µs] or [-0.100%; +0.100%] None None None

Baseline

Baseline benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3da894a 1786558862 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
concentrator/add_spans_to_concentrator execution_time 9.485ms 9.520ms ± 0.019ms 9.519ms ± 0.012ms 9.531ms 9.552ms 9.574ms 9.586ms 0.71% 0.713 0.536 0.20% 0.001ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
concentrator/add_spans_to_concentrator execution_time [9.517ms; 9.523ms] or [-0.027%; +0.027%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3da894a 1786558862 main
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
trace_buffer/1_senders/10us_delay execution_time 56.345ms 56.618ms ± 0.198ms 56.583ms ± 0.087ms 56.671ms 56.888ms 57.538ms 57.541ms 1.69% 2.599 8.977 0.35% 0.014ms 1 200
trace_buffer/1_senders/10us_delay throughput 15641.031op/s 15896.268op/s ± 55.015op/s 15905.868op/s ± 24.353op/s 15929.734op/s 15952.937op/s 15971.741op/s 15972.914op/s 0.42% -2.556 8.725 0.35% 3.890op/s 1 200
trace_buffer/1_senders/1us_delay execution_time 49.968ms 50.082ms ± 0.028ms 50.081ms ± 0.010ms 50.091ms 50.140ms 50.154ms 50.160ms 0.16% 0.250 1.779 0.05% 0.002ms 1 200
trace_buffer/1_senders/1us_delay throughput 17942.535op/s 17970.358op/s ± 9.872op/s 17970.765op/s ± 3.561op/s 17974.385op/s 17986.527op/s 17988.857op/s 18011.378op/s 0.23% -0.244 1.786 0.05% 0.698op/s 1 200
trace_buffer/1_senders/no_delay execution_time 329.340µs 336.774µs ± 5.086µs 336.253µs ± 1.521µs 337.907µs 341.544µs 346.756µs 397.315µs 18.16% 8.564 98.804 1.51% 0.360µs 1 200
trace_buffer/1_senders/no_delay throughput 2265206.944op/s 2672957.380op/s ± 36043.028op/s 2676556.660op/s ± 12109.409op/s 2688266.801op/s 2708581.948op/s 2717345.852op/s 2732734.800op/s 2.10% -7.379 80.313 1.35% 2548.627op/s 1 200
trace_buffer/2_senders/10us_delay execution_time 56.762ms 57.200ms ± 0.205ms 57.186ms ± 0.142ms 57.341ms 57.519ms 57.634ms 58.102ms 1.60% 0.448 0.901 0.36% 0.015ms 1 200
trace_buffer/2_senders/10us_delay throughput 30980.181op/s 31468.780op/s ± 112.684op/s 31476.135op/s ± 77.932op/s 31550.808op/s 31640.528op/s 31682.367op/s 31711.553op/s 0.75% -0.419 0.812 0.36% 7.968op/s 1 200
trace_buffer/2_senders/1us_delay execution_time 50.058ms 50.122ms ± 0.052ms 50.111ms ± 0.019ms 50.132ms 50.199ms 50.233ms 50.635ms 1.04% 5.147 44.996 0.10% 0.004ms 1 200
trace_buffer/2_senders/1us_delay throughput 35548.569op/s 35912.525op/s ± 37.260op/s 35920.032op/s ± 13.282op/s 35932.741op/s 35946.110op/s 35951.331op/s 35958.607op/s 0.11% -5.084 44.127 0.10% 2.635op/s 1 200
trace_buffer/2_senders/no_delay execution_time 838.540µs 875.550µs ± 18.771µs 873.423µs ± 11.742µs 885.237µs 908.003µs 937.967µs 971.493µs 11.23% 1.243 3.512 2.14% 1.327µs 1 200
trace_buffer/2_senders/no_delay throughput 1852818.090op/s 2056768.200op/s ± 43060.620op/s 2060857.324op/s ± 27338.572op/s 2086161.489op/s 2117830.157op/s 2141960.436op/s 2146588.791op/s 4.16% -1.008 2.486 2.09% 3044.846op/s 1 200
trace_buffer/4_senders/10us_delay execution_time 57.215ms 57.489ms ± 0.107ms 57.488ms ± 0.072ms 57.564ms 57.656ms 57.736ms 57.767ms 0.48% 0.006 -0.211 0.19% 0.008ms 1 200
trace_buffer/4_senders/10us_delay throughput 62319.569op/s 62620.577op/s ± 116.773op/s 62621.362op/s ± 78.252op/s 62695.256op/s 62826.755op/s 62902.305op/s 62920.184op/s 0.48% 0.004 -0.209 0.19% 8.257op/s 1 200
trace_buffer/4_senders/1us_delay execution_time 50.100ms 50.172ms ± 0.037ms 50.164ms ± 0.017ms 50.182ms 50.253ms 50.274ms 50.312ms 0.29% 1.199 1.303 0.07% 0.003ms 1 200
trace_buffer/4_senders/1us_delay throughput 71554.078op/s 71752.851op/s ± 52.191op/s 71764.765op/s ± 24.228op/s 71786.111op/s 71813.428op/s 71836.484op/s 71856.091op/s 0.13% -1.195 1.292 0.07% 3.690op/s 1 200
trace_buffer/4_senders/no_delay execution_time 2.267ms 2.425ms ± 0.066ms 2.431ms ± 0.047ms 2.475ms 2.525ms 2.552ms 2.561ms 5.34% -0.314 -0.490 2.72% 0.005ms 1 200
trace_buffer/4_senders/no_delay throughput 1405933.351op/s 1485557.301op/s ± 40997.331op/s 1481017.214op/s ± 28397.770op/s 1512503.592op/s 1558799.562op/s 1583917.439op/s 1587689.909op/s 7.20% 0.430 -0.397 2.75% 2898.949op/s 1 200
trace_buffer/8_senders/10us_delay execution_time 57.549ms 57.828ms ± 0.172ms 57.774ms ± 0.084ms 57.926ms 58.178ms 58.295ms 58.403ms 1.09% 1.138 0.808 0.30% 0.012ms 1 200
trace_buffer/8_senders/10us_delay throughput 123280.646op/s 124507.595op/s ± 368.120op/s 124623.588op/s ± 181.401op/s 124779.059op/s 124917.599op/s 125036.605op/s 125110.290op/s 0.39% -1.125 0.770 0.29% 26.030op/s 1 200
trace_buffer/8_senders/1us_delay execution_time 50.201ms 50.292ms ± 0.063ms 50.271ms ± 0.027ms 50.322ms 50.415ms 50.492ms 50.538ms 0.53% 1.560 2.498 0.12% 0.004ms 1 200
trace_buffer/8_senders/1us_delay throughput 142465.730op/s 143163.122op/s ± 179.047op/s 143222.330op/s ± 76.669op/s 143278.575op/s 143349.852op/s 143414.882op/s 143423.058op/s 0.14% -1.552 2.466 0.12% 12.661op/s 1 200
trace_buffer/8_senders/no_delay execution_time 5.798ms 6.367ms ± 0.172ms 6.387ms ± 0.113ms 6.506ms 6.580ms 6.623ms 6.671ms 4.45% -0.997 0.909 2.69% 0.012ms 1 200
trace_buffer/8_senders/no_delay throughput 1079264.535op/s 1131592.606op/s ± 31469.776op/s 1127339.918op/s ± 19869.889op/s 1146958.165op/s 1198842.230op/s 1228911.333op/s 1241783.818op/s 10.15% 1.159 1.377 2.77% 2225.249op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
trace_buffer/1_senders/10us_delay execution_time [56.590ms; 56.645ms] or [-0.048%; +0.048%] None None None
trace_buffer/1_senders/10us_delay throughput [15888.644op/s; 15903.893op/s] or [-0.048%; +0.048%] None None None
trace_buffer/1_senders/1us_delay execution_time [50.079ms; 50.086ms] or [-0.008%; +0.008%] None None None
trace_buffer/1_senders/1us_delay throughput [17968.990op/s; 17971.726op/s] or [-0.008%; +0.008%] None None None
trace_buffer/1_senders/no_delay execution_time [336.069µs; 337.479µs] or [-0.209%; +0.209%] None None None
trace_buffer/1_senders/no_delay throughput [2667962.163op/s; 2677952.597op/s] or [-0.187%; +0.187%] None None None
trace_buffer/2_senders/10us_delay execution_time [57.172ms; 57.229ms] or [-0.050%; +0.050%] None None None
trace_buffer/2_senders/10us_delay throughput [31453.163op/s; 31484.397op/s] or [-0.050%; +0.050%] None None None
trace_buffer/2_senders/1us_delay execution_time [50.115ms; 50.129ms] or [-0.014%; +0.014%] None None None
trace_buffer/2_senders/1us_delay throughput [35907.361op/s; 35917.689op/s] or [-0.014%; +0.014%] None None None
trace_buffer/2_senders/no_delay execution_time [872.949µs; 878.152µs] or [-0.297%; +0.297%] None None None
trace_buffer/2_senders/no_delay throughput [2050800.412op/s; 2062735.987op/s] or [-0.290%; +0.290%] None None None
trace_buffer/4_senders/10us_delay execution_time [57.474ms; 57.504ms] or [-0.026%; +0.026%] None None None
trace_buffer/4_senders/10us_delay throughput [62604.393op/s; 62636.760op/s] or [-0.026%; +0.026%] None None None
trace_buffer/4_senders/1us_delay execution_time [50.167ms; 50.177ms] or [-0.010%; +0.010%] None None None
trace_buffer/4_senders/1us_delay throughput [71745.618op/s; 71760.084op/s] or [-0.010%; +0.010%] None None None
trace_buffer/4_senders/no_delay execution_time [2.416ms; 2.434ms] or [-0.379%; +0.379%] None None None
trace_buffer/4_senders/no_delay throughput [1479875.465op/s; 1491239.137op/s] or [-0.382%; +0.382%] None None None
trace_buffer/8_senders/10us_delay execution_time [57.805ms; 57.852ms] or [-0.041%; +0.041%] None None None
trace_buffer/8_senders/10us_delay throughput [124456.577op/s; 124558.613op/s] or [-0.041%; +0.041%] None None None
trace_buffer/8_senders/1us_delay execution_time [50.284ms; 50.301ms] or [-0.017%; +0.017%] None None None
trace_buffer/8_senders/1us_delay throughput [143138.308op/s; 143187.936op/s] or [-0.017%; +0.017%] None None None
trace_buffer/8_senders/no_delay execution_time [6.344ms; 6.391ms] or [-0.374%; +0.374%] None None None
trace_buffer/8_senders/no_delay throughput [1127231.198op/s; 1135954.015op/s] or [-0.385%; +0.385%] None None None

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3da894a 1786558862 main
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/2644 execution_time 4.050ms 4.094ms ± 0.031ms 4.083ms ± 0.012ms 4.101ms 4.159ms 4.177ms 4.193ms 2.70% 1.289 0.777 0.76% 0.002ms 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
receiver_entry_point/report/2644 execution_time [4.090ms; 4.098ms] or [-0.105%; +0.105%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3da894a 1786558862 main
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 15.312µs 15.608µs ± 0.193µs 15.554µs ± 0.088µs 15.676µs 15.930µs 16.202µs 16.700µs 7.37% 1.855 5.774 1.23% 0.014µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [15.581µs; 15.634µs] or [-0.171%; +0.171%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 3da894a 1786558862 main
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.084µs 1.097µs ± 0.005µs 1.097µs ± 0.003µs 1.099µs 1.104µs 1.106µs 1.129µs 2.91% 0.961 6.520 0.47% 0.000µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [1.096µs; 1.098µs] or [-0.065%; +0.065%] None None None

@datadog-official

datadog-official Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 87.84%
• Overall Coverage: 76.00% (-0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 376b5d2 | Docs | Datadog PR Page | Give us feedback!

@brettlangdon
brettlangdon marked this pull request as ready for review August 7, 2026 13:25
@brettlangdon
brettlangdon requested a review from a team as a code owner August 7, 2026 13:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 067a252464

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread libdd-shared-runtime/src/shared_runtime/mod.rs Outdated
Comment thread libdd-shared-runtime/src/shared_runtime/mod.rs Outdated
@dd-octo-sts

dd-octo-sts Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Artifact Size Benchmark Report

aarch64-alpine-linux-musl
Artifact Baseline Commit Change
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.a 89.32 MB 89.32 MB +0% (+24 B) 👌
/aarch64-alpine-linux-musl/lib/libdatadog_profiling.so 8.20 MB 8.20 MB 0% (0 B) 👌
aarch64-unknown-linux-gnu
Artifact Baseline Commit Change
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.06 MB 11.06 MB 0% (0 B) 👌
/aarch64-unknown-linux-gnu/lib/libdatadog_profiling.a 100.50 MB 100.50 MB +0% (+8 B) 👌
libdatadog-x64-windows
Artifact Baseline Commit Change
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.dll 26.65 MB 26.65 MB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.lib 94.56 KB 94.56 KB 0% (0 B) 👌
/libdatadog-x64-windows/debug/dynamic/datadog_profiling_ffi.pdb 191.58 MB 191.60 MB +0% (+16.00 KB) 👌
/libdatadog-x64-windows/debug/static/datadog_profiling_ffi.lib 1001.92 MB 1001.96 MB +0% (+48.40 KB) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.dll 8.72 MB 8.72 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.lib 94.56 KB 94.56 KB 0% (0 B) 👌
/libdatadog-x64-windows/release/dynamic/datadog_profiling_ffi.pdb 25.64 MB 25.64 MB 0% (0 B) 👌
/libdatadog-x64-windows/release/static/datadog_profiling_ffi.lib 51.06 MB 51.06 MB 0% (0 B) 👌
libdatadog-x86-windows
Artifact Baseline Commit Change
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.dll 23.22 MB 23.22 MB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.lib 96.04 KB 96.04 KB 0% (0 B) 👌
/libdatadog-x86-windows/debug/dynamic/datadog_profiling_ffi.pdb 196.41 MB 196.41 MB +0% (+8.00 KB) 👌
/libdatadog-x86-windows/debug/static/datadog_profiling_ffi.lib 991.00 MB 991.04 MB +0% (+46.83 KB) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.dll 6.74 MB 6.74 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.lib 96.04 KB 96.04 KB 0% (0 B) 👌
/libdatadog-x86-windows/release/dynamic/datadog_profiling_ffi.pdb 27.58 MB 27.58 MB 0% (0 B) 👌
/libdatadog-x86-windows/release/static/datadog_profiling_ffi.lib 48.61 MB 48.61 MB +0% (+2 B) 👌
x86_64-alpine-linux-musl
Artifact Baseline Commit Change
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.a 79.57 MB 79.57 MB +0% (+16 B) 👌
/x86_64-alpine-linux-musl/lib/libdatadog_profiling.so 9.13 MB 9.13 MB 0% (0 B) 👌
x86_64-unknown-linux-gnu
Artifact Baseline Commit Change
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.a 95.22 MB 95.22 MB 0% (0 B) 👌
/x86_64-unknown-linux-gnu/lib/libdatadog_profiling.so 11.15 MB 11.15 MB 0% (0 B) 👌

Lets consumers bound a block_on wait with a deadline without adding tokio as a direct dependency — the executor is whatever the runtime already runs on. Returns BlockOnTimeoutError::TimedOut/Io to distinguish a timeout from an executor failure.
@brettlangdon
brettlangdon force-pushed the brettlangdon/block_on_timeout branch from 067a252 to 0f4a0ae Compare August 7, 2026 15:58
// catch_unwind. Catching the panic here converts it to an error, so a misconfigured
// executor cannot abort a process that calls block_on_with_timeout across the FFI
// boundary.
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we need to go through this machinery. While it's true that it could panic in theory, there are a dozen usages of timeout in various part of libdatadog that just use timeout and expect it to be there and to not panic, so I think it's reasonable to assume that there's always a timer driver. Unless you do not have one in your setup?. Even if we were to protect against that, I suppose the panic catching should rather be handled at the FFI boundary. Any thought @VianneyRuhlmann ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

My main push back on this is that the shared runtime should be abstracting away the Tokio runtime wherever possible, if we allow a tokio specific panic to be raised up to called (Rust or C FFI or etc) then we are exposing the tokio specifics to the caller, and if we ever swap out the runtime then we'll break their call sites.

@yannham yannham Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, it's a good point. In general I'm a bit wary of using catch_unwind as an exception catching mechanism; it was not really designed for that (or at least it did not became that), it is moot if panic=abort is set somewhere in the final build, and the string message matching is a bit fragile.

That being said, the perf impact is minimal in the happy path and unfortunately tokio doesn't expose an easy way to know if it was built with the timer capability, which is a bummer. So maybe it's the safest way to go for now yeah...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well, at least I'm trying: tokio-rs/tokio#8361 🤷‍♂️ in the meantime let's not block this PR,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh, nice!

Comment thread libdd-shared-runtime/src/shared_runtime/mod.rs
@brettlangdon

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-13 12:12:46 UTC ℹ️ Start processing command /merge


2026-08-13 12:12:51 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 1h (p90).


2026-08-13 12:50:38 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit a21b01f into main Aug 13, 2026
91 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the brettlangdon/block_on_timeout branch August 13, 2026 12:50
hoolioh added a commit that referenced this pull request Aug 18, 2026
)

# Release proposal for libdd-data-pipeline, libdd-telemetry and their
dependencies

This PR contains version bumps based on public API changes and commits
since last release.

## libdd-ddsketch
**Next version:** `1.1.1`
**Semver bump:** `patch`
**Tag:** `libdd-ddsketch-v1.1.1`

### Commits

- refactor: migrate to workspace dependencies, phase 4 (#2296)
- chore: moving to workspace-level dependencies, phase 2 (#2270)

## libdd-shared-runtime
**Next version:** `3.0.0`
**Semver bump:** `major`
**Tag:** `libdd-shared-runtime-v3.0.0`

### ⚠️ major bump forced due to:

- `libdd-capabilities`: ^2.1.0 → ^3.0.0
- `libdd-capabilities-impl`: ^3.0.0 → ^4.0.0

### Commits

- feat(shared-runtime): add block_on_with_timeout to BlockingRuntime
(#2333)
- chore(runtime): restart all workers on invalid state (#2262)
- refactor: migrate to workspace dependencies, phase 3 (#2283)
- refactor: consolidate core dependencies at workspace level (phase 1)
(#2253)

## libdd-dogstatsd-client
**Next version:** `5.0.0`
**Semver bump:** `major`
**Tag:** `libdd-dogstatsd-client-v5.0.0`

### Commits

- refactor: consolidate core dependencies at workspace level (phase 1)
(#2253)
- feat(dogstatsd)!: add shared_runtime buffered sink (#2224)
- refactor(statsd)!: make client clonable (#2222)

## libdd-telemetry
**Next version:** `7.0.0`
**Semver bump:** `major`
**Tag:** `libdd-telemetry-v7.0.0`

### Commits

- refactor(rc)!: make conversion from RemoteConfigProduct back and forth
generally available (#2325)
- feat(telemetry)!: Add Installation signature and AppProduct changes
payloads (#2213)
- fix(telemetry)!: stop sending Connection: close to the Agent (#2286)
- refactor: migrate to workspace dependencies, phase 3 (#2283)
- chore: moving to workspace-level dependencies, phase 2 (#2270)
- refactor: consolidate core dependencies at workspace level (phase 1)
(#2253)
- fix: drain the mailbox before stopping (#2258)
- feat(telemetry)!: make telemetry worker wasm-compatible for the
TraceExporter (#2172)
- fix(sidecar): don't double-encode file:// telemetry endpoints (#2230)

## libdd-trace-obfuscation
**Next version:** `6.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-obfuscation-v6.0.0`

### ⚠️ major bump forced due to:

- `libdd-trace-utils`: ^9.0.0 → ^10.1.0

### Commits

- refactor: migrate to workspace dependencies, phase 4 (#2296)
- chore(lint): update nightly (#2281)
- chore: moving to workspace-level dependencies, phase 2 (#2270)
- refactor: consolidate core dependencies at workspace level (phase 1)
(#2253)
- fix: new clippy lints (#2219)

## libdd-trace-stats
**Next version:** `7.0.0`
**Semver bump:** `major`
**Tag:** `libdd-trace-stats-v7.0.0`

### ⚠️ major bump forced due to:

- `libdd-capabilities`: ^2.1.0 → ^3.0.0
- `libdd-capabilities-impl`: ^3.0.0 → ^4.0.0
- `libdd-dogstatsd-client`: ^4.0.0 → ^5.0.0
- `libdd-telemetry`: ^6.0.0 → ^7.0.0
- `libdd-trace-utils`: ^9.0.0 → ^10.1.0

### Commits

- feat: add v1 isolated bricks for trace exporter (#2280)
- refactor: migrate to workspace dependencies, phase 4 (#2296)
- feat(data-pipeline)!: add compression option for agentless export
(#2205)
- feat(stats)!: per-field cardinality limits (#2211)
- refactor: migrate to workspace dependencies, phase 3 (#2283)
- feat(stats)!: string field length limit (#2267)
- feat(trace_exporter)!: add `restart_after_fork` configuration option
[APMSP-3843] (#2263)
- refactor: consolidate core dependencies at workspace level (phase 1)
(#2253)
- feat(stats)!: implement additional metric tags in libdd-trace-stats
(#2170)
- refactor(statsd)!: make client clonable (#2222)
- fix(stats-exporter): disable retries for stats payload sends (#2249)
- feat(telemetry)!: make telemetry worker wasm-compatible for the
TraceExporter (#2172)
- fix!: css obfuscation logic (#2203)

## libdd-data-pipeline
**Next version:** `8.0.0`
**Semver bump:** `major`
**Tag:** `libdd-data-pipeline-v8.0.0`

### ⚠️ major bump forced due to:

- `libdd-capabilities`: ^2.1.0 → ^3.0.0
- `libdd-capabilities-impl`: ^3.0.0 → ^4.0.0
- `libdd-dogstatsd-client`: ^4.0.0 → ^5.0.0
- `libdd-telemetry`: ^6.0.0 → ^7.0.0
- `libdd-trace-stats`: ^6.0.0 → ^7.0.0
- `libdd-trace-utils`: ^9.0.0 → ^10.1.0

### Commits

- fix(trace-exporter): mark OTLP client-computed stats (#2245)
- feat(data-pipeline): adds new attributes to OTLP trace metrics export
(#2316)
- feat: add v1 isolated bricks for trace exporter (#2280)
- feat(data-pipeline)!: add flush_and_close to the trace buffer (#2313)
- feat(telemetry)!: Add Installation signature and AppProduct changes
payloads (#2213)
- refactor: migrate to workspace dependencies, phase 4 (#2296)
- feat(data-pipeline)!: add compression option for agentless export
(#2205)
- fix(telemetry)!: stop sending Connection: close to the Agent (#2286)
- feat(stats)!: per-field cardinality limits (#2211)
- refactor: migrate to workspace dependencies, phase 3 (#2283)
- feat(stats)!: string field length limit (#2267)
- refactor(trace-utils)!: split generic TracerHeaderTags (#2279)
- chore: moving to workspace-level dependencies, phase 2 (#2270)
- feat(trace_exporter)!: add `restart_after_fork` configuration option
[APMSP-3843] (#2263)
- feat(data-pipeline): emit additional_metric_tags on OTLP span duration
metric (#2264)
- refactor: consolidate core dependencies at workspace level (phase 1)
(#2253)
- feat(dogstatsd)!: add shared_runtime buffered sink (#2224)
- feat(stats)!: implement additional metric tags in libdd-trace-stats
(#2170)
- refactor(statsd)!: make client clonable (#2222)
- feat(telemetry)!: make telemetry worker wasm-compatible for the
TraceExporter (#2172)
- feat(trace_exporter)!: remove deprecated methods (#2250)
- feat(trace-utils)!: add v1 decoder (#2174)
- feat(trace-utils)!: add encoder v1 to v04 + refactor (#2145)
- feat(otlp): add instrumentation scope metadata (#2235)
- fix(trace-utils)!: serialize v0.5 span links and events into meta
(#980)
- fix!: css obfuscation logic (#2203)
- test(data-pipeline): gate telemetry-only tests behind the telemetry
feature (#2204)


[APMSP-3843]:
https://datadoghq.atlassian.net/browse/APMSP-3843?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: hoolioh <107922352+hoolioh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants