An open API service indexing awesome lists of open source software.

https://github.com/djoezeke/cprofiler

A Realtime Sample Call Stack and Performance Profiling Library for C/C++.
https://github.com/djoezeke/cprofiler

analysis c cpp development library performance profiler profiling

Last synced: about 1 year ago
JSON representation

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

Awesome Lists containing this project

README

          

# CProfiler

## Features:

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

## Basic Usage

```c
#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;
}
```