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

Should factorLatency use c.Threshold as Quantile? #2

Open
yflau opened this issue Sep 8, 2020 · 3 comments
Open

Should factorLatency use c.Threshold as Quantile? #2

yflau opened this issue Sep 8, 2020 · 3 comments

Comments

@yflau
Copy link

yflau commented Sep 8, 2020

I think we should define an independent variable to represent the Quantile for factorLatency while not use c.Threshold,where c.Threshold should be the latency value?

 		l := hist.LatencyAtQuantile(c.Threshold)
		if l.Nanoseconds()/int64(time.Millisecond) > int64(c.Threshold) {
			isTripped = true
		}
@mholt
Copy link
Member

mholt commented Sep 8, 2020

What is your reasoning for that? You might be right, I just want to know why you think so.

@yflau
Copy link
Author

yflau commented Sep 9, 2020

As I understand, for hist.LatencyAtQuantile should accept a meaningful value between 0 and 100, and returns the latency value(l.Nanoseconds()/int64(time.Millisecond)) of a quantile, then if the value large than the threshold, should tripped.

For example, if I want it to be tripped when 90% latency > 300 milliseconds, but if I set the Threshold to 300, then the result will be 100% latency > 300milliseconds, which is not what I want.

@mholt
Copy link
Member

mholt commented Sep 25, 2020

Your logic sounds correct, yeah. Will let @dannav chime in when he has a chance too, he understands the implications a little better than I do (off-hand, anyway).

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

No branches or pull requests

2 participants