#include <string>
#include "easy/profiler.h"
#include "easy/arbitrary_value.h"
#include <iostream>
int main()
{
EASY_MAIN_THREAD;
EASY_PROFILER_ENABLE;
EASY_FUNCTION();
EASY_BLOCK("main");
auto sum = 0;
for(long i=0; i< 100'000'000; i++) {
EASY_BLOCK("loop");
sum +=i;
}
std::cout << "hello world" << std::endl;
EASY_END_BLOCK;
auto blk_cnt = profiler::dumpBlocksToFile("easy_profile2.prof");
std::cout << "Blocks count: " << blk_cnt << std::endl;
return 0;
}
cmake_minimum_required(VERSION 3.5)
project(demo)
find_package(easy_profiler REQUIRED)
add_executable(demo ./test.cpp)
target_compile_definitions(demo PUBLIC BUILD_WITH_EASY_PROFILER)
target_link_libraries(demo easy_profiler)
My test demo is shown above, but I always get a block of size 0, at the same time the easy_profiler_gui tips
Cannot read profiled blocks Reason: Wrong memory size == 0 for 0 blocks
Did I do something wrong?
btw: I'm using version 2.1.0
My test demo is shown above, but I always get a block of size 0, at the same time the easy_profiler_gui tips
Cannot read profiled blocks Reason: Wrong memory size == 0 for 0 blocksDid I do something wrong?
btw: I'm using version 2.1.0