Skip to content

Remove unimplemented get_synthetic_latency placeholder#64

Open
ff225 wants to merge 1 commit into
mainfrom
fix/sciot-050-remove-dead-code
Open

Remove unimplemented get_synthetic_latency placeholder#64
ff225 wants to merge 1 commit into
mainfrom
fix/sciot-050-remove-dead-code

Conversation

@ff225

@ff225 ff225 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Addresses part of Remove dead code and unused placeholders (profiler.py, get_synthetic_latency) #50 (the other part — a commented-out AdvancedProfiler block in profiler.py — no longer exists on main; it appears to have already been cleaned up in an earlier change, so nothing to do there).
  • MessageData.get_synthetic_latency() was a placeholder that always returned 1 and was never completed. It only ever multiplied latency by 1 inside get_avg_speed, so removing it changes no runtime behavior.
  • Removed the synthetic_latency class attribute, get_synthetic_latency(), and the corresponding parameter from get_avg_speed. Updated the one call site in request_handler.py::_extend_message_data.

Test plan

  • Added unit tests in tests/unit/test_message_data.py covering get_avg_speed (including zero-latency) and confirming the placeholder is gone.
  • uv run pytest tests/unit/test_message_data.py -q — 5 passed
  • Full fast suite (tests/unit, integration subset, mqtt, offloading_algo) — 187 passed, 1 skipped, no regressions

Closes #50

It always returned 1, was never completed, and only served as a no-op
multiplier in get_avg_speed. Drop the field and the multiplication
rather than complete a never-specified behavior.
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
fast-tests 37.54% <100.00%> (+0.10%) ⬆️
http-integration 14.10% <50.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/server/communication/message_data.py 63.93% <100.00%> (+7.87%) ⬆️
src/server/communication/request_handler.py 39.48% <ø> (+0.25%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove dead code and unused placeholders (profiler.py, get_synthetic_latency)

1 participant