-
Notifications
You must be signed in to change notification settings - Fork 264
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
Merge Int64DataPoint and DoubleDataPoint into ScalarDataPoint and support different sum types in Histogram #208
Conversation
b4e83af
to
b69e538
Compare
Signed-off-by: Bogdan Drutu <[email protected]>
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 prefer #209 as it uses less memory, but I also support this option as it tends to produce smaller code.
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 would value the readability & maintainability of this proto going forward (which might allow faster iteration & increase adoption) more highly than a <1% performance difference in this case, so prefer this over #209. I find easier to read this than the other one, and I would imagine the other approach would get messier (more duplication) as we add more to it.
(but I don't feel that strongly about it either way)
I agree performance difference is negligible and we need to choose based on usability or some other criteria. |
Thought about this more and I prefer #209 for the reasons I put in gitter: extensibility (can add new types that work only on some measurement types like strings if we decide to support that); no corner cases like measurement type is long and exemplars are using double values. It seems there is no clear winner so I would want to move forward with that one |
I am going to close this and ask everyone to review #209. |
This is the first option to fix #206
Cannot see any significant difference between merged messages vs split messages, code is here https://github.com/bogdandrutu/metrics-proto