MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / WritePoolTestResult

Function WritePoolTestResult

src/Tests.cpp:7578–7622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7576}
7577
7578static void WritePoolTestResult(
7579 FILE* file,
7580 const char* codeDescription,
7581 const char* testDescription,
7582 const PoolTestConfig& config,
7583 const PoolTestResult& result)
7584{
7585 float totalTimeSeconds = ToFloatSeconds(result.TotalTime);
7586 float allocationTimeMinSeconds = ToFloatSeconds(result.AllocationTimeMin);
7587 float allocationTimeAvgSeconds = ToFloatSeconds(result.AllocationTimeAvg);
7588 float allocationTimeMaxSeconds = ToFloatSeconds(result.AllocationTimeMax);
7589 float deallocationTimeMinSeconds = ToFloatSeconds(result.DeallocationTimeMin);
7590 float deallocationTimeAvgSeconds = ToFloatSeconds(result.DeallocationTimeAvg);
7591 float deallocationTimeMaxSeconds = ToFloatSeconds(result.DeallocationTimeMax);
7592
7593 std::string currTime;
7594 CurrentTimeToStr(currTime);
7595
7596 fprintf(file,
7597 "%s,%s,%s,"
7598 "ThreadCount=%u PoolSize=%llu FrameCount=%u TotalItemCount=%u UsedItemCount=%u...%u ItemsToMakeUnusedPercent=%u,"
7599 "%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%.2f,%I64u,%I64u\n",
7600 // General
7601 codeDescription,
7602 testDescription,
7603 currTime.c_str(),
7604 // Config
7605 config.ThreadCount,
7606 (unsigned long long)config.PoolSize,
7607 config.FrameCount,
7608 config.TotalItemCount,
7609 config.UsedItemCountMin,
7610 config.UsedItemCountMax,
7611 config.ItemsToMakeUnusedPercent,
7612 // Results
7613 totalTimeSeconds * 1e6f,
7614 allocationTimeMinSeconds * 1e6f,
7615 allocationTimeAvgSeconds * 1e6f,
7616 allocationTimeMaxSeconds * 1e6f,
7617 deallocationTimeMinSeconds * 1e6f,
7618 deallocationTimeAvgSeconds * 1e6f,
7619 deallocationTimeMaxSeconds * 1e6f,
7620 result.FailedAllocationCount,
7621 result.FailedAllocationTotalSize);
7622}
7623
7624static void PerformCustomMainTest(FILE* file)
7625{

Callers 2

PerformCustomPoolTestFunction · 0.85
PerformPoolTestsFunction · 0.85

Calls 2

ToFloatSecondsFunction · 0.85
CurrentTimeToStrFunction · 0.85

Tested by

no test coverage detected