本文整理汇总了Python中hdrh.histogram.HdrHistogram.reset方法的典型用法代码示例。如果您正苦于以下问题:Python HdrHistogram.reset方法的具体用法?Python HdrHistogram.reset怎么用?Python HdrHistogram.reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hdrh.histogram.HdrHistogram
的用法示例。
在下文中一共展示了HdrHistogram.reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_jHiccup_v2_log
# 需要导入模块: from hdrh.histogram import HdrHistogram [as 别名]
# 或者: from hdrh.histogram.HdrHistogram import reset [as 别名]
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()