-
Notifications
You must be signed in to change notification settings - Fork 524
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
query-tee: add support for comparing native histograms in results #8724
Conversation
0147308
to
718ca00
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with tiny nit, thank you for the extensive test coverage! According to VS code all branches are covered.
return math.Abs(first-second) <= opts.Tolerance | ||
} | ||
|
||
func compareSampleHistogramPair(expected, actual model.SampleHistogramPair, opts SampleComparisonOptions) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: call inputs first and second as compareSampleValue. Function doesn't care and in line with the other function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function does care about which input is which, as they're used to produce the error message when comparison fails (eg. "expected timestamp X but got Y").
The names here mirror those of compareSamplePair
, which uses these names for the same reason.
What this PR does
This PR adds support for comparing native histograms in query results to query-tee.
Previously, any native histograms in query results were ignored.
I've also taken this opportunity to clarify some of the error messages generated when results do not match, and to replace the use of
errors.Wrap
withfmt.Errorf
inresponse_comparator.go
.Which issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.