1 2 3 4 5 6 7
#include <gperftools/profiler.h> int main() { ProfilerStart("/dev/null"); ProfilerStop(); return 0; }