Skip to content

Commit 018f04f

Browse files
committed
[add] added getter for int_to_double_conversion_ratio. exteded test_jHiccup_v2_log()
1 parent 0a8c2fd commit 018f04f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

hdrh/histogram.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,9 @@ def decode(encoded_histogram, b64_wrap=True):
574574
def get_word_size(self):
575575
return self.word_size
576576

577+
def get_int_to_double_conversion_ratio(self):
578+
return self.int_to_double_conversion_ratio
579+
577580
def output_percentile_distribution(self,
578581
out_file,
579582
output_value_unit_scaling_ratio,

test/test_hdrhistogram.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,8 @@ def test_jHiccup_v2_log():
618618
accumulated_histogram.add(decoded_histogram)
619619
# These logs use 8 byte counters
620620
assert decoded_histogram.get_word_size() == 8
621+
# These logs use the default 1.0 conversion ratio
622+
assert decoded_histogram.get_int_to_double_conversion_ratio() == 1.0
621623
for statement in target_numbers:
622624
assert eval(statement) == target_numbers[statement]
623625

0 commit comments

Comments
 (0)