Speeds are divided by two different constants depending on where they are computed, and every one of them reaches the user labelled MB/s:
| Where |
Code |
Unit it actually is |
| Per-file live speed |
moon_download.py:513 — / 1_048_576 |
MiB/s |
| Per-file final average |
moon_download.py:545 — / 1e6 |
MB/s |
| Engine aggregate speed |
moon_engine.py:582 — / 1_048_576 |
MiB/s |
| Report session speed |
moon_download.py:275, 337 — / 1e6 |
MB/s |
| Stall detector threshold |
moon_download.py:525 — / 1e6 |
MB/s |
1_048_576 / 1_000_000 = 1.048576, so the two families disagree by 4.9% for the same real transfer rate.
Two visible consequences:
- A file downloading at a perfectly steady rate shows one number while it runs and a ~4.9% higher number the moment it completes, with nothing having changed.
- The live speed in the GUI and the "Session speed" line in the
moontech_*.log report disagree by 4.9% for the same run.
The stall detector is the one place where the choice actually matters beyond display: STALL_MIN_MBS is compared against an /1e6 value, so whichever convention is chosen, that comparison must stay consistent with the constant's intended meaning.
Acceptance criteria
- One convention throughout.
/1e6 with the label MB/s is the honest pairing and matches what the reports already claim
- The live number and the final average for the same file agree
STALL_MIN_MBS still means what its name and its comment say
- Say in the pull request which convention you picked and list every line you changed
No Windows machine needed to reason about it, though it is worth a real run to confirm the numbers now line up.
Speeds are divided by two different constants depending on where they are computed, and every one of them reaches the user labelled
MB/s:moon_download.py:513—/ 1_048_576moon_download.py:545—/ 1e6moon_engine.py:582—/ 1_048_576moon_download.py:275,337—/ 1e6moon_download.py:525—/ 1e61_048_576 / 1_000_000 = 1.048576, so the two families disagree by 4.9% for the same real transfer rate.Two visible consequences:
moontech_*.logreport disagree by 4.9% for the same run.The stall detector is the one place where the choice actually matters beyond display:
STALL_MIN_MBSis compared against an/1e6value, so whichever convention is chosen, that comparison must stay consistent with the constant's intended meaning.Acceptance criteria
/1e6with the labelMB/sis the honest pairing and matches what the reports already claimSTALL_MIN_MBSstill means what its name and its comment sayNo Windows machine needed to reason about it, though it is worth a real run to confirm the numbers now line up.