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:
parent
6e2eda256d
commit
3138795899
@ -505,8 +505,8 @@ def bench():
|
|||||||
assert byte_count == sum(len(f.data) for f in test_frame)
|
assert byte_count == sum(len(f.data) for f in test_frame)
|
||||||
assert frame_count == len(test_frame)
|
assert frame_count == len(test_frame)
|
||||||
|
|
||||||
test_rate = 1.0 * rate_num / rate_denom
|
test_rate = float(rate_num) / float(rate_denom)
|
||||||
meas_rate = 1.0 * byte_count / tick_count
|
meas_rate = float(byte_count) / float(tick_count)
|
||||||
error = (test_rate - meas_rate) / test_rate
|
error = (test_rate - meas_rate) / test_rate
|
||||||
|
|
||||||
print("test rate %f" % test_rate)
|
print("test rate %f" % test_rate)
|
||||||
|
@ -515,8 +515,8 @@ def bench():
|
|||||||
assert byte_count == sum(len(f.data) for f in test_frame)
|
assert byte_count == sum(len(f.data) for f in test_frame)
|
||||||
assert frame_count == len(test_frame)
|
assert frame_count == len(test_frame)
|
||||||
|
|
||||||
test_rate = 1.0 * rate_num / rate_denom
|
test_rate = float(rate_num) / float(rate_denom)
|
||||||
meas_rate = 1.0 * byte_count / tick_count
|
meas_rate = float(byte_count) / float(tick_count)
|
||||||
error = (test_rate - meas_rate) / test_rate
|
error = (test_rate - meas_rate) / test_rate
|
||||||
|
|
||||||
print("test rate %f" % test_rate)
|
print("test rate %f" % test_rate)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user