ARX  1.2.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
profile.c File Reference
#include <stdio.h>
#include <sys/time.h>
#include <ARX/ARUtil/profile.h>
Include dependency graph for profile.c:

Macros

#define LOG(...)
#define LOGe(...)

Functions

void profileClear (void)
 Reset profiling.
void profileSet (int n)
 Set profiling initial time and timing bucket, or add elapsed time to a bucket.
void profilePrint (void)
 Print all profiling buckets.

Variables

long profTable [MAX_PROF_NUM]
int profCount [MAX_PROF_NUM]

Macro Definition Documentation

◆ LOG

#define LOG ( ...)
Value:
printf(__VA_ARGS__)

◆ LOGe

#define LOGe ( ...)
Value:
fprintf(stderr, __VA_ARGS__)

Function Documentation

◆ profileClear()

void profileClear ( void )

Reset profiling.

The profiling facility provides a single profile per process. There are up to MAX_PROF_NUM timing buckets available, numbered 0 to MAX_PROF_NUM-1. Call this function before the first call to profileSet to have the first call to profileSet function set the initial time and timing bucket.

See also
profileSet
Here is the call graph for this function:

◆ profilePrint()

void profilePrint ( void )

Print all profiling buckets.

Prints all non-zero timing buckets and the percentage time occupied and total time.

Here is the call graph for this function:

◆ profileSet()

void profileSet ( int n)

Set profiling initial time and timing bucket, or add elapsed time to a bucket.

This function sets a profiling timing point and selects the timing bucket. If being called for the first time, or the first time since profileClear was called, it sets the initial time, and subsequent calls will log time into the timing bucket n. On subsequent calls, the elapsed time since the last call will be added to the previously set timing bucket, and will again set the timing bucket.

Parameters
nThe timing bucket to add to on the next call.
See also
profileClear profilePrint
Here is the call graph for this function:

Variable Documentation

◆ profCount

int profCount[MAX_PROF_NUM]

◆ profTable

long profTable[MAX_PROF_NUM]