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

refactor: optimzed database reads #12

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Conversation

manu0466
Copy link

@manu0466 manu0466 commented Oct 8, 2024

Description

This PR removes the monitoring of the total blocks that where indexed in order to reduce the CPU usage by the database.
Additionally ensure that all the metrics that are computed by reading from the database are updated only if the monitoring is enabled.

CPU Usage difference:
cpu-usage

Closes: API-85

Checklist

  • Targeted PR against correct branch.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit tests.
  • Re-reviewed Files changed in the Github PR explorer.

@manu0466 manu0466 changed the title refactor: optimzed database monitoring refactor: optimzed database access Oct 8, 2024
@manu0466 manu0466 changed the title refactor: optimzed database access refactor: optimzed database reads Oct 8, 2024
Copy link

@rustcandy rustcandy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@hallazzang hallazzang left a comment

Choose a reason for hiding this comment

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

LGTM!

@RiccardoM RiccardoM merged commit 537f814 into main Oct 8, 2024
4 checks passed
@RiccardoM RiccardoM deleted the manuel/reduce-cpu-usage branch October 8, 2024 15:03
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.

4 participants