| 7576 | } |
| 7577 | |
| 7578 | static 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 | |
| 7624 | static void PerformCustomMainTest(FILE* file) |
| 7625 | { |
no test coverage detected