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

perf(metrics): cache handles for database transaction metrics #6730

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

sevazhidkov
Copy link
Contributor

@sevazhidkov sevazhidkov commented Feb 21, 2024

Fixes #6564.

  • Implements a metric handle cache for transaction-related metrics, similar to Database operation metrics should be cached #6457.
  • Splits TransactionMetrics to TransactionMetrics and TransactionOutcomeMetrics, since they already had different labels and different use cases (tx count vs commit latency / tx duration).

Before (lots of TransactionMetrics calls in different DB operations):
Screenshot 2024-02-22 at 00 06 17

After (pretty much just MDBX latency left):
Screenshot 2024-02-22 at 00 06 26

@sevazhidkov sevazhidkov marked this pull request as ready for review February 22, 2024 00:08
@shekhirin shekhirin self-requested a review February 22, 2024 10:24
@shekhirin shekhirin added C-perf A change motivated by improving speed, memory usage or disk footprint A-db Related to the database labels Feb 22, 2024
Copy link
Collaborator

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

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

LGTM, one naming nit

crates/storage/db/src/metrics.rs Outdated Show resolved Hide resolved
@shekhirin shekhirin requested a review from DaniPopes February 22, 2024 10:31
@shekhirin shekhirin added this pull request to the merge queue Feb 22, 2024
Merged via the queue into paradigmxyz:main with commit 755ce9e Feb 22, 2024
29 checks passed
@shekhirin shekhirin mentioned this pull request Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-db Related to the database C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database transaction metrics should be cached
2 participants