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

Improving Node-Metrics backend canister #712

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

pietrodimarco-dfinity
Copy link
Contributor

@pietrodimarco-dfinity pietrodimarco-dfinity commented Aug 13, 2024

  • Decreased number of instruction needed to update metrics.
    This is especially relevant when stable memory is empty (before it risked exhausting the number of instructions allowed for timers) 37B before vs 700M now.
    This was mainly due to the multiple accesses to stable map using metrics_before_ts querying the metrics before a ts for a specific node_id. Replaced now with latest_metrics which goes through the data only once.

The use of unbounded data for NodeMetricsStored

  • Added Virtual Memory needed for storing additional data structures (node providers mapping in the future)

  • Modified NodeMetricsStored serialization to be bounded

@pietrodimarco-dfinity pietrodimarco-dfinity requested a review from a team as a code owner August 13, 2024 13:57
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title Improvement Node-Metrics backend canister Improving Node-Metrics backend canister Aug 13, 2024
Copy link
Member

@sasa-tomic sasa-tomic left a comment

Choose a reason for hiding this comment

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

🎉

@pietrodimarco-dfinity pietrodimarco-dfinity merged commit 2b16d1c into main Aug 13, 2024
4 checks passed
@pietrodimarco-dfinity pietrodimarco-dfinity deleted the improve-node-metrics-backend-canister branch August 13, 2024 14:46
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