Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Allow to set samples rescale threshold #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kaero
Copy link
Contributor

@kaero kaero commented Sep 4, 2014

Global function to set and get global rescale threshold for exponentially decaying samples, which construction is hidden by default metrics constructors.

@kaero
Copy link
Contributor Author

kaero commented Sep 6, 2014

@rcrowley PR doesn't includes tests, because I want to discuss the solution before finish the PR.

I think, the most robust solution will be change of the EDS structure and constructor to allow custom rescale threshold as the field and argument. But it will break the backward compatibility and grows up the complexity of the user code, which requires custom rescale threshold, because it avoids the ability to use Registry.GetOrRegisterTimer, for example. So my changes provides an easy way to set custom rescale threshold for a whole application, which covers my application requirements :)

@rcrowley
Copy link
Owner

rcrowley commented Oct 4, 2014

First of all, I'm sorry for the delay. Second of all, I'm wondering what you think about just exporting RescaleThreshold as a number. If you set it in init or main before launching any goroutines it's perfectly safe and we'd avoid the read-write lock every time it rescales.

Plus, that wouldn't need tests. :)

@mihasya
Copy link
Collaborator

mihasya commented Jul 4, 2015

@kaero thoughts on @rcrowley's last comment? Thanks!

@mihasya mihasya added the feature label Jul 4, 2015
@narqo
Copy link

narqo commented Nov 24, 2015

Any progress here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants