Add file name to make performance/storage test more realistic.
Also add timing information.
@@ -63,7 +63,7 @@ storageTestPerfInfoList(
{
for (uint64_t fileIdx = 0; fileIdx < this->fileTotal; fileIdx++)
{
- callback(callbackData, &(StorageInfo){.exists = true});
+ callback(callbackData, &(StorageInfo){.exists = true, .name = STRDEF("name")});
MEM_CONTEXT_TEMP_RESET(1000);
}
}
@@ -196,11 +196,15 @@ testRun(void)
Storage *storageRemote = storageRemoteNew(
STORAGE_MODE_FILE_DEFAULT, STORAGE_MODE_PATH_DEFAULT, false, NULL, client, 1);
+ TimeMSec timeBegin = timeMSec();
+
// Storage info list
TEST_RESULT_VOID(
storageInfoListP(storageRemote, NULL, storageTestDummyInfoListCallback, NULL),
"list %" PRIu64 " remote files", fileTotal);
+ TEST_LOG_FMT("list transferred in %ums", (unsigned int)(timeMSec() - timeBegin));
+
// Free client
protocolClientFree(client);
}
