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++.
- Host: GitHub
- URL: https://github.com/djoezeke/cprofiler
- Owner: djoezeke
- Created: 2025-03-11T16:29:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-18T01:49:47.000Z (about 1 year ago)
- Last Synced: 2025-06-11T05:03:59.292Z (about 1 year ago)
- Topics: analysis, c, cpp, development, library, performance, profiler, profiling
- Language: C++
- Homepage:
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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;
}
```