Commit 55d3ca4
committed
Bugfix: Bulk-skip credit no longer pollutes throughput estimator
After e7f657d made bulk-skip correctly credit `bytes_done`, the ETA estimator started treating the instant counter jump as throughput: the bulk-skip delta over ε time pinned `bytes_per_second` at GB/s level on the first sample, and EWMA took 10+ samples (many seconds) to decay it. User-visible symptom: speeds opened with bogus values (1.91 GB/s instead of ~15 MB/s, 63 files/s instead of ~1 file/s, ~20 s ETA instead of ~20 min) before settling.
- `EtaEstimator::reseed_baseline(now, bytes, files)` re-anchors `last_t/last_bytes/last_files` and resets `samples` to 0 without changing the phase. The bulk-skip jump becomes the new starting point, not a delta.
- Both driver preludes (`drive_transfer_serial_sync`, `drive_transfer_serial_async`) and the inline concurrent path in `copy_volumes_with_progress` call `reseed_baseline` right before emitting the bulk-skip event.
- New unit test `bulk_skip_baseline_jump_does_not_pollute_rate` pins the property: after a `(0, 0)` → `(22 GB, 250 files)` jump over 1 ms followed by a real `15 MB / 1 file` in 1 s emit, `bytes_per_second < 50 MB/s` and `files_per_second < 5`. Pre-fix this test fails with GB/s-level rates.1 parent b1f707b commit 55d3ca4
3 files changed
Lines changed: 98 additions & 0 deletions
File tree
- apps/desktop/src-tauri/src/file_system/write_operations
Lines changed: 78 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
96 | 123 | | |
97 | 124 | | |
98 | 125 | | |
| |||
291 | 318 | | |
292 | 319 | | |
293 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
294 | 372 | | |
295 | 373 | | |
296 | 374 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
388 | 396 | | |
389 | 397 | | |
390 | 398 | | |
| |||
610 | 618 | | |
611 | 619 | | |
612 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
613 | 626 | | |
614 | 627 | | |
615 | 628 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
615 | 622 | | |
616 | 623 | | |
617 | 624 | | |
| |||
0 commit comments