C++性能分析easy_profiler
测试环境
VS2022 + Qt5.14.2
示例
#include <easy/profiler.h>
#include <easy/arbitrary_value.h>
void func() {
EASY_FUNCTION(profiler::colors::DarkCyan);
uint64_t sum = 0;
EASY_VALUE("sum", sum, profiler::colors::Blue);
}
void thread() {
EASY_THREAD("Resource loading");
for(itn i = 0; i < 50; ++i) {
EASY_END_BLOCK;
EASY_NONSCOPED_BLOCK("Frame", true, 15., profiler::ON, -5.f, profiler::colors::Red); // 一帧
EASY_EVENT("Resources Loading!", profiler::colors::Cyan);
EASY_TEXT("Test String", "Some short text. Hey!", profiler::colors::Red);
}
EASY_END_BLOCK;
}
void main() {
// start
EASY_PROFILER_ENABLE;
EASY_MAIN_