本文首发于个人博客https://kezunlin.me/post/91b7cf13/,欢迎阅读最新内容!
tutorial to compile and use esay profiler with c on ubuntu 16.04
Guide
compile
git clone https://github.com/yse/easy_profiler.git
cd easy_profiler && mkdir build && cd build && cmake-gui ..
make -j8
sudo make install
usage
CMakeLists.txt
find_package(easy_profiler REQUIRED)
#easy_profiler_Dir /usr/local/lib/cmake/easy_profiler
target_link_libraries(my_application easy_profiler)
code
#include <easy/profiler.h>
void foo() {
EASY_FUNCTION(profiler::colors::Magenta); // Magenta block with name "foo&#