Skip to content

Bug: Downstream timings not updated on bridges#847

Merged
gbin merged 2 commits into
masterfrom
gbin/bug/bridge_timings
Feb 21, 2026
Merged

Bug: Downstream timings not updated on bridges#847
gbin merged 2 commits into
masterfrom
gbin/bug/bridge_timings

Conversation

@gbin

@gbin gbin commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

I realized that because with the new bridges logmon started to log 0us latency

Summary

Related issues

  • Closes #

Changes

Testing

  • just fmt
  • just lint
  • just test
  • optional full just std-ci (if std/runtime paths are impacted)
  • optional full just nostd-ci (if embedded/no_std paths are impacted)
  • Other (please specify):

pro-tip: just with no parameters in the root defaults to just fmt, just lint, and just test.

Checklist

  • I have updated docs or examples where needed
  • I have added or updated tests where needed
  • I have considered platform impact (Linux/macOS/Windows/embedded)
  • I have considered config/logging changes (if applicable)
  • This change is not a breaking change (or I documented it below)

Breaking changes (if any)

Additional context

I realized that because with the new bridges logmon started to log 0us
latency

Copilot AI left a comment

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.

Pull request overview

Fixes bridge Tx timing metadata so downstream monitors (e.g., logmon) no longer see zero/incorrect latency for bridge transmit steps.

Changes:

  • Derive macro now identifies the BridgeTx step’s output message slot and stamps metadata.process_time.start/end on that output slot instead of the input message.
Comments suppressed due to low confidence (1)

core/cu29_derive/src/lib.rs:4455

  • process_time.end is currently stamped after the error-handling block, which means the measured range includes monitoring/decision logic (and in Abort/Shutdown branches it may never be stamped due to early returns). To keep BridgeTx timings comparable to BridgeRx (which stamps end immediately after receive), stamp end right after bridge.send(...) returns and before any monitor.process_error(...) handling.
                    cumsg_output.metadata.process_time.start = clock.now().into();
                    let maybe_error = {
                        #rt_guard
                        bridge.send(
                            clock,
                            &<#bridge_type as cu29::cubridge::CuBridge>::Tx::#const_ident,
                            &*cumsg_input,
                        )
                    };
                    if let Err(error) = maybe_error {
                        let decision = monitor.process_error(#monitor_index, CuTaskState::Process, &error);
                        match decision {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/cu29_derive/src/lib.rs
@gbin gbin merged commit 211ebd1 into master Feb 21, 2026
23 checks passed
@gbin gbin deleted the gbin/bug/bridge_timings branch February 21, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working include in changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants