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

Function PerformCustomPoolTest

src/Tests.cpp:7653–7684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7651}
7652
7653static void PerformCustomPoolTest(FILE* file)
7654{
7655 PoolTestConfig config;
7656 config.PoolSize = 100 * 1024 * 1024;
7657 config.RandSeed = 2345764;
7658 config.ThreadCount = 1;
7659 config.FrameCount = 200;
7660 config.ItemsToMakeUnusedPercent = 2;
7661
7662 AllocationSize allocSize = {};
7663 allocSize.BufferSizeMin = 1024;
7664 allocSize.BufferSizeMax = 1024 * 1024;
7665 allocSize.Probability = 1;
7666 config.AllocationSizes.push_back(allocSize);
7667
7668 allocSize.BufferSizeMin = 0;
7669 allocSize.BufferSizeMax = 0;
7670 allocSize.ImageSizeMin = 128;
7671 allocSize.ImageSizeMax = 1024;
7672 allocSize.Probability = 1;
7673 config.AllocationSizes.push_back(allocSize);
7674
7675 config.PoolSize = config.CalcAvgResourceSize() * 200;
7676 config.UsedItemCountMax = 160;
7677 config.TotalItemCount = config.UsedItemCountMax * 10;
7678 config.UsedItemCountMin = config.UsedItemCountMax * 80 / 100;
7679
7680 PoolTestResult result = {};
7681 TestPool_Benchmark(result, config);
7682
7683 WritePoolTestResult(file, "Code desc", "Test desc", config, result);
7684}
7685
7686static void PerformMainTests(FILE* file)
7687{

Callers 1

TestFunction · 0.85

Calls 4

TestPool_BenchmarkFunction · 0.85
WritePoolTestResultFunction · 0.85
CalcAvgResourceSizeMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected