Skip to content

Commit a414f87

Browse files
committed
Merge pull request #10 from zeulb/clear-histogram-values
Clear histogram values
2 parents 8354178 + 1e12bcc commit a414f87

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

hdrh/histogram.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ def reset(self):
390390
self.total_count = 0
391391
self.min_value = sys.maxsize
392392
self.max_value = 0
393+
self.start_time_stamp_msec = sys.maxsize
394+
self.end_time_stamp_msec = 0
393395

394396
def __iter__(self):
395397
'''Returns the recorded iterator if iter(self) is called

test/test_hdrhistogram.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import os
2828
import pytest
2929
import zlib
30+
import sys
3031

3132
from ctypes import addressof
3233
from ctypes import c_uint8
@@ -282,6 +283,8 @@ def test_reset():
282283
histogram.reset()
283284
assert(histogram.get_total_count() == 0)
284285
assert(histogram.get_value_at_percentile(99.99) == 0)
286+
assert(histogram.get_start_time_stamp() == sys.maxsize)
287+
assert(histogram.get_end_time_stamp() == 0)
285288

286289
@pytest.mark.basic
287290
def test_invalid_significant_figures():

0 commit comments

Comments
 (0)