Skip to content

djoezeke/CProfiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CProfiler

Features:

  • Lightweight instrumentation
  • Multiple threads Support.
  • Console output for logging text.
  • Profiles itself.

Basic Usage

#include "../cprofiler.h"

void Function(Profiler *prof)
{
    START(prof);
    usleep(200);
    STOP(prof);
}

void Function1(Profiler *prof)
{
    START(prof);
    sleep(1);
    STOP(prof);
}

void Function2(Profiler *prof)
{
    START(prof);
    sleep(1);
    STOP(prof);
}

int main()
{
    Profiler *prof = newProfiler("Profiler");

    Function1(prof);
    Function2(prof);
    Function2(prof);

    prof->Profile(prof);

    freeProfiler(prof);
    return 0;
}

About

A Realtime Sample Call Stack and Performance Profiling Library for C/C++.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published