Skip to content

Commit

Permalink
[add] added getter for int_to_double_conversion_ratio. exteded test_j…
Browse files Browse the repository at this point in the history
…Hiccup_v2_log()
  • Loading branch information
filipecosta90 committed Nov 1, 2019
1 parent 0a8c2fd commit 018f04f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hdrh/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,9 @@ def decode(encoded_histogram, b64_wrap=True):
def get_word_size(self):
return self.word_size

def get_int_to_double_conversion_ratio(self):
return self.int_to_double_conversion_ratio

def output_percentile_distribution(self,
out_file,
output_value_unit_scaling_ratio,
Expand Down
2 changes: 2 additions & 0 deletions test/test_hdrhistogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,8 @@ def test_jHiccup_v2_log():
accumulated_histogram.add(decoded_histogram)
# These logs use 8 byte counters
assert decoded_histogram.get_word_size() == 8
# These logs use the default 1.0 conversion ratio
assert decoded_histogram.get_int_to_double_conversion_ratio() == 1.0
for statement in target_numbers:
assert eval(statement) == target_numbers[statement]

Expand Down

0 comments on commit 018f04f

Please sign in to comment.