pmt: fix memory leaks, and improve info function

- Removed --no-write-test argument of memory test function
 - Fixed memory leak of memory test function
 - Improved info function with using nlohmann/json header-only library
 - Some other improvents
This commit is contained in:
2025-08-14 12:56:29 +03:00
parent bf0df8cc83
commit 563e8a583e
12 changed files with 25795 additions and 48 deletions

View File

@@ -101,6 +101,7 @@ class infoFunction final : public FunctionBase {
private:
std::vector<std::string> partitions;
std::string jNamePartition, jNameSize, jNameLogical;
int jIndentSize = 2;
bool jsonFormat = false;
public:
@@ -175,7 +176,7 @@ class memoryTestFunction final : public FunctionBase {
private:
uint64_t bufferSize = MB(4), /* bufferSizeRandom = KB(4),*/ testFileSize = 0;
std::string testPath;
bool doNotWriteTest = false, doNotReadTest = false;
bool doNotReadTest = false;
public:
CLI::App *cmd = nullptr;