Skip to content

[controllers] fix: use monotonic batch timing - #263

Merged
Wangmerlyn merged 1 commit into
mainfrom
codex/controller-monotonic-batch-timing
Jul 1, 2026
Merged

[controllers] fix: use monotonic batch timing#263
Wangmerlyn merged 1 commit into
mainfrom
codex/controller-monotonic-batch-timing

Conversation

@Wangmerlyn

Copy link
Copy Markdown
Owner

Summary

  • Switch CUDA, ROCm, and MPS batch elapsed debug timing from wall-clock time.time() to time.monotonic().
  • Add no-GPU regression coverage that forbids wall-clock timing in backend batch methods.
  • Clarify AGENTS and contributing docs that elapsed-duration measurements use monotonic clocks.

Verification

  • RED: PYTHONPATH=src pytest tests/single_gpu_controller/test_batch_timing.py failed on all three backend methods while they called time.time().
  • GREEN: PYTHONPATH=src pytest tests/single_gpu_controller/test_batch_timing.py -> 3 passed.
  • PYTHONPATH=src pytest tests/single_gpu_controller/test_batch_timing.py tests/cuda_controller/test_throttle.py tests/rocm_controller/test_rocm_backoff.py tests/macm_controller/test_macm_backoff.py -> 79 passed, 1 skipped.
  • mkdocs build --strict -> passed.
  • pre-commit run --all-files --show-diff-on-failure -> passed.
  • PYTHONPATH=src pytest tests -> 1029 passed, 11 skipped.

Local subagent review

  • Reviewer: Dalton the 4th
  • Verdict: Ready to merge. No Critical, Important, or Minor issues.

Notes

  • README was not touched; the Zenodo DOI badge remains present.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Wangmerlyn, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 446e6988-5818-4582-b514-016696c1c87d

📥 Commits

Reviewing files that changed from the base of the PR and between 4aed7fd and e7e9560.

📒 Files selected for processing (6)
  • AGENTS.md
  • docs/contributing.md
  • src/keep_gpu/single_gpu_controller/cuda_gpu_controller.py
  • src/keep_gpu/single_gpu_controller/macm_gpu_controller.py
  • src/keep_gpu/single_gpu_controller/rocm_gpu_controller.py
  • tests/single_gpu_controller/test_batch_timing.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/controller-monotonic-batch-timing

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

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@Wangmerlyn
Wangmerlyn force-pushed the codex/controller-monotonic-batch-timing branch from e4b00bc to e7e9560 Compare July 1, 2026 21:13
@Wangmerlyn
Wangmerlyn merged commit c6e4aba into main Jul 1, 2026
6 checks passed
@Wangmerlyn
Wangmerlyn deleted the codex/controller-monotonic-batch-timing branch July 1, 2026 21:16
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