fix update of best chunk size

This commit is contained in:
2026-05-03 08:44:37 +02:00
parent 4ae0a89ccd
commit 8856fc4b9c
+16
View File
@@ -136,6 +136,22 @@ void Shred::evaluateThroughput(Drive *drive)
" MB/s with " + to_string(currentChunkSize / (1024 * 1024)) +
" MB chunks - Drive: " + drive->getSerial());
}
else if (currentChunkSize == bestChunkSize)
{
// Update best throughput when measuring at best chunk size
// This ensures bestThroughputMBps reflects CURRENT performance, not old burst
if (throughputMBps < bestThroughputMBps)
{
Logger::logThis()->info("Updating best throughput: " +
to_string((int)bestThroughputMBps) + " MB/s -> " +
to_string((int)throughputMBps) + " MB/s " +
"(sustained performance at best chunk size: " +
to_string(bestChunkSize / (1024 * 1024)) + " MB)" +
" - Drive: " + drive->getSerial());
bestThroughputMBps = throughputMBps;
}
throughputIncreasing = false;
}
else
{
throughputIncreasing = false;