fix looping memory test function

This commit is contained in:
2025-08-15 22:47:13 +03:00
parent 20ad64c8c5
commit 62b73ac91a

View File

@@ -84,6 +84,7 @@ bool memoryTestFunction::run() {
const ssize_t ret = write(wfd, buffer, bufferSize); const ssize_t ret = write(wfd, buffer, bufferSize);
if (ret < 0) throw Error("Can't write to test file: %s\n", strerror(errno)); if (ret < 0) throw Error("Can't write to test file: %s\n", strerror(errno));
bytesWritten += ret; bytesWritten += ret;
}
const auto endWrite = std::chrono::high_resolution_clock::now(); const auto endWrite = std::chrono::high_resolution_clock::now();
@@ -93,7 +94,6 @@ bool memoryTestFunction::run() {
(static_cast<double>(testFileSize) / (1024.0 * 1024.0)) / (static_cast<double>(testFileSize) / (1024.0 * 1024.0)) /
writeTime); writeTime);
LOGN(MTFUN, INFO) << "Sequential write test done!" << std::endl; LOGN(MTFUN, INFO) << "Sequential write test done!" << std::endl;
}
if (!doNotReadTest) { if (!doNotReadTest) {
auto *rawBuffer = new char[bufferSize + 4096]; auto *rawBuffer = new char[bufferSize + 4096];