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: improve performance of gauge inc() dec() #503

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Jun 15, 2022

Motivation

  • Right now when using gauge.inc() or gauge.dec(), we call hashObject() 2 times
  • It's better to call hashObject() once as in counter.inc()

Description

  • New function setValueDelta() with a hash param
  • gauge.inc() and gauge.dec() to call setValueDelta() via setDelta() function

Copy link
Collaborator

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks!

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