1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-30 08:32:52 +08:00

Fix rate limiter testbenches

This commit is contained in:
Alex Forencich 2015-03-21 02:55:30 -07:00
parent 6e2eda256d
commit 3138795899
2 changed files with 4 additions and 4 deletions

View File

@ -505,8 +505,8 @@ def bench():
assert byte_count == sum(len(f.data) for f in test_frame)
assert frame_count == len(test_frame)
test_rate = 1.0 * rate_num / rate_denom
meas_rate = 1.0 * byte_count / tick_count
test_rate = float(rate_num) / float(rate_denom)
meas_rate = float(byte_count) / float(tick_count)
error = (test_rate - meas_rate) / test_rate
print("test rate %f" % test_rate)

View File

@ -515,8 +515,8 @@ def bench():
assert byte_count == sum(len(f.data) for f in test_frame)
assert frame_count == len(test_frame)
test_rate = 1.0 * rate_num / rate_denom
meas_rate = 1.0 * byte_count / tick_count
test_rate = float(rate_num) / float(rate_denom)
meas_rate = float(byte_count) / float(tick_count)
error = (test_rate - meas_rate) / test_rate
print("test rate %f" % test_rate)