This commit is contained in:
@@ -18,18 +18,18 @@ def test_motor_instantiation_fast_vs_epics():
|
||||
with patch('epics.Motor.get') as mock_get, \
|
||||
patch('epics.Motor.RTYP', new_callable=PropertyMock) as mock_rtyp:
|
||||
|
||||
# Mean of 10 runs
|
||||
for _ in range(10):
|
||||
t0 = time.perf_counter()
|
||||
m_fast = Motor("TEST:MOTOR_t1")
|
||||
t1 = time.perf_counter()
|
||||
|
||||
t2 = time.perf_counter()
|
||||
m_slow = epics.Motor("TEST:MOTOR_t2")
|
||||
t3 = time.perf_counter()
|
||||
|
||||
fast_times.append(t1 - t0)
|
||||
slow_times.append(t3 - t2)
|
||||
# Mean of 10 runs
|
||||
for _ in range(10):
|
||||
t0 = time.perf_counter()
|
||||
m_fast = Motor("TEST:MOTOR_t1")
|
||||
t1 = time.perf_counter()
|
||||
|
||||
t2 = time.perf_counter()
|
||||
m_slow = epics.Motor("TEST:MOTOR_t2")
|
||||
t3 = time.perf_counter()
|
||||
|
||||
fast_times.append(t1 - t0)
|
||||
slow_times.append(t3 - t2)
|
||||
|
||||
avg_fast = sum(fast_times) / len(fast_times)
|
||||
avg_slow = sum(slow_times) / len(slow_times)
|
||||
|
||||
Reference in New Issue
Block a user