-
Notifications
You must be signed in to change notification settings - Fork 52
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
return empty series if metrics exist in index and has no points #240
Conversation
* fix: NaN is filled when index has no point - it is always filled either other index result has points or not
- This was done to prevent issue go-graphite#235
- step1: test is failing - step2: tests are about 60% complete
- increased test coverage for `render` from 29.1% to 69.1%
render/reply/formatter_test.go
Outdated
// result when CHResponse.AppendOutEmptySeries is false | ||
expected0 []client.Metric | ||
// result when CHResponse.AppendOutEmptySeries is true | ||
expected1 []client.Metric |
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.
may be better expectedWithoutEmpty and expectedWithEmpty instead of magic names expected0 / expected1?
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.
I tried using names like this, but they sounded ambiguous too. In this case,
expected0 == expectedWithEmpty
?
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.
expected0 => expectedWithoutEmpty ?
@@ -90,23 +93,8 @@ func (cc *CHResponses) ToMultiFetchResponseV2() (*v2pb.MultiFetchResponse, error | |||
func (c *CHResponse) ToMultiFetchResponseV3() (*v3pb.MultiFetchResponse, 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.
ToMultiFetchResponseV2 also need changes for Null Points like ToMultiFetchResponseV3
// result when CHResponse.AppendOutEmptySeries is true | ||
expected1 []client.Metric | ||
expectedWithoutEmpty []client.Metric |
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.
May be naming mistake and expectedWithoutEmpty <-> expectedWithtEmpty ?
// result when CHResponse.AppendOutEmptySeries is true
expected1 []client.Metric
expectedWithoutEmpty []client.Metric
return empty series if metrics exist in index and has no points
Refs: #178