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 NodeDB metrics for DbSize and DirtySpace #13822

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

antonis19
Copy link
Member

@antonis19 antonis19 commented Feb 14, 2025

This is to enable comparison of different SyncPeriod parameters for NodeDB to understand the impact on performance and select the appropriate parameter value. Related task: #13550

The only problem is that I cannot directly use MdbxKV.CollectMetrics() since that would overwrite the metrics collected from the main MDBX instance.

@@ -750,3 +751,11 @@ func (m *MemoryMutation) HistoryRange(name kv.Domain, fromTs, toTs int, asc orde
func (m *MemoryMutation) HistoryStartFrom(name kv.Domain) uint64 {
return m.db.(kv.TemporalTx).HistoryStartFrom(name)
}

func (m *MemoryMutation) EnvInfo() (*mdbxgo.EnvInfo, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is leaking abstraction: return underlying data-type. Check - maybe don't need it.

Also i see existing method:

type HasSpaceDirty interface {
	SpaceDirty() (uint64, uint64, error)
}

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.

2 participants