Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add time metrics to aquire fork-choice lock #6204

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

dapplion
Copy link
Collaborator

Issue Addressed

Better visibility into lock contention issues regarding the fork-choice

Proposed Changes

Add basic time metrics to aquire fork-choice lock, without labels

Possible improvements

  • Label the histogram extending fn fork_choice_write_lock(label: &str) so that each caller tags the time measurement by its location.
  • Wrap the returned type into (RwLockWriteGuard<BeaconForkChoice<T>>, HistogramTimer) to always time how long the lock is acquired for. Is there a cleaner way to achieve the same goal generically? Can we mess with RwLockWriteGuard?

@dapplion dapplion added the ready-for-review The code is ready for review label Jul 30, 2024
@michaelsproul michaelsproul added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Aug 19, 2024
@dapplion dapplion added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Aug 19, 2024
@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Aug 19, 2024
@michaelsproul
Copy link
Member

@mergify queue

Copy link

mergify bot commented Aug 20, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 1f0d129

mergify bot added a commit that referenced this pull request Aug 20, 2024
@mergify mergify bot merged commit 1f0d129 into sigp:unstable Aug 20, 2024
28 checks passed
@dapplion dapplion deleted the fork-choice-lock-metrics branch August 20, 2024 11:20
AgeManning pushed a commit to AgeManning/lighthouse that referenced this pull request Sep 3, 2024
* Add time metrics to aquire fork-choice lock

* Apply suggestions from code review

Co-authored-by: Michael Sproul <[email protected]>

* Merge remote-tracking branch 'sigp/unstable' into fork-choice-lock-metrics

* fix merge issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants