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 metrics for inmemory canonical state #9806

Closed
Tracked by #8742
mattsse opened this issue Jul 25, 2024 · 0 comments · Fixed by #10085
Closed
Tracked by #8742

Add metrics for inmemory canonical state #9806

mattsse opened this issue Jul 25, 2024 · 0 comments · Fixed by #10085
Assignees
Labels
A-observability Related to tracing, metrics, logs and other observability tools C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jul 25, 2024

we should have some metrics for this that tracks

  • number of entries

#[derive(Debug, Default)]
pub(crate) struct InMemoryState {
/// All canonical blocks that are not on disk yet.
blocks: RwLock<HashMap<B256, Arc<BlockState>>>,
/// Mapping of block numbers to block hashes.
numbers: RwLock<HashMap<u64, B256>>,
/// The pending block that has not yet been made canonical.
pending: RwLock<Option<BlockState>>,
}

@mattsse mattsse added C-enhancement New feature or request A-observability Related to tracing, metrics, logs and other observability tools labels Jul 25, 2024
@onbjerg onbjerg self-assigned this Aug 5, 2024
onbjerg added a commit that referenced this issue Aug 5, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-observability Related to tracing, metrics, logs and other observability tools C-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants