-
Notifications
You must be signed in to change notification settings - Fork 337
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
text_serializer is still not 100% locale indenpendent. PFA patch with the fix #509
Comments
gjasny
pushed a commit
that referenced
this issue
Sep 9, 2021
Thank you for the fix! |
gjasny
pushed a commit
that referenced
this issue
Sep 9, 2021
gjasny
pushed a commit
that referenced
this issue
Sep 9, 2021
ns-codereview
pushed a commit
to couchbase/tlm
that referenced
this issue
Aug 1, 2023
- Prints integer counter values without trailing '.000000', saving ~10% network bandwidth for integer counter metrics (jupp0r/prometheus-cpp#509). Change-Id: I76465d12fe4cac5a1ade528925665805fe7a916b Reviewed-on: https://review.couchbase.org/c/tlm/+/191668 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Chris Hillery <ceej@couchbase.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
text_serializer.cc-> Serialize api is still not fully locale independent even after temporarily switching the locale config of the ostream. The double values still react to the global locale settings as the library is using std::snprintf to convert double to char array before writing it to the ostream. this method call is not affected by what locale is set to be used by ostream. I have attached a diff which achieves same formatting of double as snprintf's "%.*g", std::numeric_limits::max_digits10 - 1
Please find the attached patch that we used for this fix: locale-0.12.3.patch.zip
The text was updated successfully, but these errors were encountered: