1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-15 01:04:37 +02:00

Add file name to make performance/storage test more realistic.

Also add timing information.
This commit is contained in:
David Steele
2020-07-31 16:18:56 -04:00
parent 9f1e7d88da
commit bfb489a82d

View File

@ -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);
}