mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Skip when the state fails and use the cumulative totals when comparing
This commit is contained in:
parent
0f2bfbe104
commit
af852710e9
1 changed files with 6 additions and 3 deletions
|
@ -415,7 +415,10 @@ def test_performance(
|
|||
break
|
||||
else:
|
||||
return duration
|
||||
pytest.skip("Something went wrong with the states, skipping.")
|
||||
pytest.skip("Something went wrong with the states, skipping.")
|
||||
|
||||
prev_duration = 0
|
||||
curr_duration = 0
|
||||
|
||||
for _ in range(applies):
|
||||
prev_state_ret = prev_master.run(
|
||||
|
@ -423,7 +426,7 @@ def test_performance(
|
|||
"state.apply", f"{subdir}.{prev_sls}", minion_tgt=prev_minion.id
|
||||
)
|
||||
)
|
||||
prev_duration = _gather_durations(prev_state_ret, prev_minion.id)
|
||||
prev_duration += _gather_durations(prev_state_ret, prev_minion.id)
|
||||
|
||||
for _ in range(applies):
|
||||
curr_state_ret = curr_master.run(
|
||||
|
@ -431,7 +434,7 @@ def test_performance(
|
|||
"state.apply", f"{subdir}.{curr_sls}", minion_tgt=curr_minion.id
|
||||
)
|
||||
)
|
||||
curr_duration = _gather_durations(curr_state_ret, curr_minion.id)
|
||||
curr_duration += _gather_durations(curr_state_ret, curr_minion.id)
|
||||
|
||||
# We account for network slowness, etc... here.
|
||||
# There is a hard balance here as far as a threshold.
|
||||
|
|
Loading…
Add table
Reference in a new issue