Skip to content

Add monitor of timer thread task - #3603

Merged
wwbmmm merged 1 commit into
apache:masterfrom
chenBright:timer_task_latency
Oct 18, 2026
Merged

wwbmmm merged 1 commit into
apache:masterfrom
chenBright:timer_task_latency

Conversation

@chenBright

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: resolve

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects:

  • Breaking backward compatibility:


Check List:

@chenBright
chenBright requested a lite review from Copilot October 14, 2026 02:14

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

4 open findings
What changed in this PR

Adds per-task latency monitoring to TimerThread and updates ignore rules for Bazel lockfiles.

Changes:

  • Instrument TimerThread::Task execution time with a bvar::LatencyRecorder and expose it under the configured bvar prefix.
  • Switch Task members to in-class initialization and adjust run_and_delete signature to accept the latency recorder.
  • Ignore MODULE.bazel.lock in .gitignore.
File Description
src/​bthread/​timer_thread.cpp Adds task latency recording/exposure and updates Task initialization + API to pass the recorder.
.gitignore Adds Bazel module lockfile to ignored files.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/bthread/timer_thread.cpp Resolved
Comment thread src/bthread/timer_thread.cpp Resolved
Comment thread src/bthread/timer_thread.cpp Resolved
Comment thread src/bthread/timer_thread.cpp Resolved

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.

Comment thread src/bthread/timer_thread.cpp Resolved
Comment thread src/bthread/timer_thread.cpp Resolved
@chenBright

Copy link
Copy Markdown
Contributor Author

I believe this PR is ready for a final human review. I’ve evaluated the Copilot feedback and fixed the confirmed issues.

@wwbmmm PTAL.

@chenBright
chenBright requested a review from wwbmmm October 14, 2026 05:28
@wwbmmm
wwbmmm merged commit c4f0a92 into apache:master Oct 18, 2026
25 checks passed
@chenBright
chenBright deleted the timer_task_latency branch October 18, 2026 02:40
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