-
Notifications
You must be signed in to change notification settings - Fork 217
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
Ensuring we produce a valid JSON in case of empty string and -nan #273
base: master
Are you sure you want to change the base?
Conversation
…cy tracking value. recording min/max outside of hdr_histogram to avoid caps. increased per second rotated histogram precision
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #273 +/- ##
==========================================
+ Coverage 64.53% 65.26% +0.72%
==========================================
Files 21 21
Lines 4368 4445 +77
==========================================
+ Hits 2819 2901 +82
+ Misses 1549 1544 -5 ☔ View full report in Codecov by Sentry. |
// to be retrocompatible | ||
jsonhandler->write_obj("Latency","%.3f", avg_latency); | ||
jsonhandler->write_obj("Average Latency","%.3f", avg_latency); | ||
jsonhandler->write_obj("Accumulated Latency","%lld", m_total_latency / LATENCY_HDR_RESULTS_MULTIPLIER); |
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.
Is this just a sum of all command latency experienced throughout the test? Is it more-or-less equivalent to Average Latency * Ops
?
@@ -110,6 +110,18 @@ size_t hdr_get_memory_size(struct hdr_histogram* h); | |||
*/ | |||
bool hdr_record_value(struct hdr_histogram* h, int64_t value); |
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.
Is this still being used anywhere? Can it be removed?
If not, and you're keeping it for compat purposes, should the method docs be updated to indicate it's deprecated or something?
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.
Is this still being used anywhere?
@DrEsteban it's coming from the original repo: https://github.com/HdrHistogram/HdrHistogram_c
I believe it's best to create an issue there and document this further on the function signature.
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.
Went ahead and did that: HdrHistogram/HdrHistogram_c#126
Please add details or clarifications as necessary.
We can reproduce easily with:
-nan
,inf
) #271To confirm the issue is fixed, we've added a test that previously generated bad JSON.
old output:
new output (valid json):