how to measure the optimized time between android-app using pipelineCache and not?
- use .spv
- use pipelineCace
how to measure the CPU and GPU time of the above 2 methods
Thanks!
how to measure the optimized time between android-app using pipelineCache and not?
Dear @gpu22
Great question! Measuring the impact of VkPipelineCache is all about timing the pipeline creation phase. You’re not benchmarking frame rate here, but how long it takes to build pipelines during app startup or scene load.
A simple way to do this:
You can wrap the pipeline creation call with a timestamp like this:
auto start = std::chrono::high_resolution_clock::now();
vkCreateGraphicsPipelines(...);
auto end = std::chrono::high_resolution_clock::now();
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
std::cout << "Pipeline creation took " << duration << " ms\n";
On Android, you might also want to log to logcat or use systrace to visualize startup time.
Just remember: pipeline cache helps reduce creation time, but only if the cache is valid and reused correctly. Always check return values and make sure the cache file is actually being loaded.
~p3nGu1nZz
PS. if you want even more accurate i highly suggest checking out VALVe’s SDL2 lib which has get performance timing for even better precision