mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-30 15:47:20 -05:00
feat: transfer event splits local and network
The engine counts the bytes a copy, the pack or a resumed partial copy supplied, and those the network brought. A transfer event carries both after each progress event and once when the downloads end, so a screen shows a download speed without guessing.
This commit is contained in:
1 parent
b0e9894275
commit
a5e025b7ee
6 files changed
+82
-6
No files matched your search
@@ -5102,7 +5102,10 @@ class EventsDescribeTheRun(unittest.TestCase, _SyntheticTree):
|
||||
"bytes_total": 245}
|
||||
for n, (dest, size, total) in enumerate(
|
||||
(("c.bin", 70, 70), ("d.bin", 25, 95), ("b.bin", 150, 245)), 1)]
|
||||
self.assertEqual([e for e in events if e["event"] != "progress"],
|
||||
# The last transfer: every byte came over the network.
|
||||
self.assertEqual([e for e in events if e["event"] == "transfer"][-1],
|
||||
{"event": "transfer", "bytes_local": 0, "bytes_network": 245})
|
||||
self.assertEqual([e for e in events if e["event"] not in ("progress", "transfer")],
|
||||
self._head("install", installer) + [
|
||||
{"event": "download", "platform": "retroarch", "files": 3, "bytes": 245},
|
||||
*done,
|
||||
|
||||
Reference in new issue
Block a user