diff --git a/src/shred.cpp b/src/shred.cpp index 22335d4..bc5ba06 100644 --- a/src/shred.cpp +++ b/src/shred.cpp @@ -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;