def test_jHiccup_v2_log(): accumulated_histogram = HdrHistogram(LOWEST, HIGHEST, SIGNIFICANT) for checklist in JHICCUP_CHECKLISTS: accumulated_histogram.reset() log_reader = HistogramLogReader(JHICCUP_V2_LOG_NAME, accumulated_histogram) histogram_count = 0 total_count = 0 target_numbers = checklist.pop('target') while 1: decoded_histogram = log_reader.get_next_interval_histogram( **checklist) if not decoded_histogram: break histogram_count += 1 total_count += decoded_histogram.get_total_count() 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] log_reader.close()
def test_jHiccup_v2_log(): accumulated_histogram = HdrHistogram(LOWEST, HIGHEST, SIGNIFICANT) for checklist in JHICCUP_CHECKLISTS: accumulated_histogram.reset() log_reader = HistogramLogReader(JHICCUP_V2_LOG_NAME, accumulated_histogram) histogram_count = 0 total_count = 0 target_numbers = checklist.pop('target') while 1: decoded_histogram = log_reader.get_next_interval_histogram(**checklist) if not decoded_histogram: break histogram_count += 1 total_count += decoded_histogram.get_total_count() accumulated_histogram.add(decoded_histogram) # These logs use 8 byte counters assert(decoded_histogram.get_word_size() == 8) for statement in target_numbers: assert(eval(statement) == target_numbers[statement]) log_reader.close()