Skip to content

Profile many-worlds command latency components - #12471

Merged
dezren39 merged 2 commits into
mainfrom
profile/f12-12-command-latency-breakdown-20261122
Nov 22, 2026
Merged

dezren39 merged 2 commits into
mainfrom
profile/f12-12-command-latency-breakdown-20261122

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Evidence

  • ~/tools/fleet-build-lock cargo bench --bench world_bench -- --only many_worlds — passed; 20,000 commands and 100 checkpoint/eviction/reopen assertions completed.
  • python3 scripts/test_world_bench_profile.py — passed.
  • git diff --check — passed.
  • rustfmt --edition 2024 --check pkgs/id/benches/world_bench.rs — passed.
  • Recorded under shared fleet build activity: end-to-end p99 6142.516 ms, wake-lateness p99 6092.517 ms, input/ack p99 379.032 ms. Component percentiles are diagnostic and not additive.

Merge Danger

Low. Benchmark instrumentation and evidence only; no runtime behavior changes. The profile was captured under shared build load and is not an unloaded performance comparison.


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 07:58
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 97b1a2db-aea7-42b5-b12a-9e8dfef37891
Commits

Reviewing files that changed from the base of the PR and between 61919f1 and a23803c.

Files selected for processing: 4

  • pkgs/id/benches/BASELINES.md
  • pkgs/id/benches/baseline.txt
  • pkgs/id/benches/world_bench.rs
  • scripts/test_world_bench_profile.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T08:02:07.262534Z a23803c PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit e988a85 into main Nov 22, 2026
2 checks passed
@dezren39
dezren39 deleted the profile/f12-12-command-latency-breakdown-20261122 branch November 22, 2026 07:59

@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: a23803cbad

ℹ️ 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 on lines +327 to +328
let input_started = Instant::now();
let wake_lateness = input_started.saturating_duration_since(deadline);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Separate command backlog from scheduler wake lateness

When an input acknowledgement takes longer than the 50 ms submission interval, this per-world loop does not register the next timer until that acknowledgement completes. For example, a 500 ms first acknowledgement makes the next sample report roughly 450 ms of wake_lateness even if Tokio schedules every ready task immediately. The new metric therefore includes backlog from earlier input calls, not just scheduler wake delay, so it cannot support the committed baseline's conclusion that the tail is attributable to late task wake-up. Track that backlog separately from timer wake delay, or label the metric and diagnostic conclusion as submission lateness rather than scheduler latency.

Useful? React with 👍 / 👎.

# many_worlds wake/input profile measured 2026-11-22 on the same reference machine
# (rustc 1.99.0, Linux 6.18.60); shared fleet build activity, build-lock slot 1/2.
# Diagnostic only: wake lateness dominates this run's end-to-end tail. See BASELINES.md.
bench many_worlds unit=ms_per_command median=885.541 min=5.341 reps=1 p50_ms=885.541 p95_ms=4760.759 p99_ms=6142.516 wake_p50_ms=829.994 wake_p95_ms=4710.759 wake_p99_ms=6092.517 input_ack_p50_ms=10.283 input_ack_p95_ms=194.474 input_ack_p99_ms=379.032 target_p99_ms=50 target_met=false idle_worlds=1000 active_worlds=100 events_per_second=20 duration_secs=10 commands=20000 load_elapsed_secs=12.941 completed_events_per_second=1545.5 checkpoint_triggers=100 checkpoints=100 evicted=100 reopened=100

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep only one active many-worlds baseline record

Appending this record leaves two bench many_worlds lines in baseline.txt, with the existing measurement still at line 17. The parser in .github/scripts/id-bench-compare.sh:219-224 explicitly marks duplicate benchmark names as malformed, and lines 264-273 then report the benchmark as incomparable instead of calculating a regression. Since .github/workflows/id-bench.yml:109 passes this file directly to the comparison script, every successful benchmark run now loses its many-worlds regression signal. Keep exactly one active baseline record and retain the historical or diagnostic measurement in BASELINES.md or a comment.

Useful? React with 👍 / 👎.

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.

1 participant