Make timing total the sum of its named windows

This commit is contained in:
J. Nick Koston
2026-08-21 01:11:25 -05:00
parent e585be36f6
commit ba48151e92
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -392,9 +392,9 @@ def test_perform_ota_no_auth(
mock_socket.recv.side_effect = recv_responses
# Distinct window lengths pin each duration to its label; exactly the 7
# Distinct window lengths pin each duration to its label; exactly the 6
# expected perf_counter calls, so an unaccounted timing window raises
timings = [0.0, 2.0, 10.0, 15.0, 20.0, 27.0, 30.0]
timings = [0.0, 2.0, 10.0, 15.0, 20.0, 27.0]
with (
patch("time.perf_counter", side_effect=timings),
caplog.at_level(logging.INFO),
@@ -413,7 +413,7 @@ def test_perform_ota_no_auth(
# pin each duration to its label
assert "Preparing for upload took 2.00 seconds" in caplog.text
assert (
"Update took 30.00 seconds (prepare 2.00, upload 5.00, commit 7.00)"
"Update took 14.00 seconds (prepare 2.00, upload 5.00, commit 7.00)"
in caplog.text
)