Ensuring we produce a valid JSON in case of empty string and -nan#273
Ensuring we produce a valid JSON in case of empty string and -nan#273filipecosta90 merged 5 commits intomasterfrom
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. 🚨 Try these New Features:
|
| // 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.
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.
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.
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.
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):