Skip to content

the same speed is computed in MiB/s in some places and MB/s in others, all labelled "MB/s" #84

Description

@LeyckerS

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions