|
|
@ -96,6 +96,7 @@ class TestLagd: |
|
|
|
estimator = LateralLagEstimator(mocked_CP, 0.05) |
|
|
|
estimator = LateralLagEstimator(mocked_CP, 0.05) |
|
|
|
|
|
|
|
|
|
|
|
ds = [] |
|
|
|
ds = [] |
|
|
|
|
|
|
|
test_start = time.perf_counter() |
|
|
|
for _ in range(1000): |
|
|
|
for _ in range(1000): |
|
|
|
st = time.perf_counter() |
|
|
|
st = time.perf_counter() |
|
|
|
estimator.update_points() |
|
|
|
estimator.update_points() |
|
|
@ -103,4 +104,8 @@ class TestLagd: |
|
|
|
d = time.perf_counter() - st |
|
|
|
d = time.perf_counter() - st |
|
|
|
ds.append(d) |
|
|
|
ds.append(d) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# limit the test to 20 seconds |
|
|
|
|
|
|
|
if time.perf_counter() - test_start > 20.0: |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
|
|
|
|
assert np.mean(ds) < 0.05 |
|
|
|
assert np.mean(ds) < 0.05 |
|
|
|