Add explicit info for immeasurable throughput

And remove an unnecessary assignment

Change-Id: I81e124ebf761a943e75bf9568085668362b7c50e
This commit is contained in:
Kota Tsuyuzaki 2016-12-20 22:46:58 -08:00
parent ee6e409d83
commit a60186ace4

View File

@ -147,7 +147,6 @@ class TestPyECLib(unittest.TestCase):
:return average encode time
"""
timer = Timer()
tsum = 0
handle = pyeclib_c.init(num_data, num_parity, ec_type, hd)
whole_file_bytes = self.get_tmp_file(file_size).read()
@ -290,7 +289,7 @@ class TestPyECLib(unittest.TestCase):
size = float(size_desc[0])
if avg_time == 0:
return '?'
return '? (test finished too fast to calculate throughput)'
if size_desc[1] == 'M':
throughput = size / avg_time