| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
Macros | Functions
profile.h File Reference
`#include <ARX/ARUtil/types.h>`
Include dependency graph for profile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | MAX_PROF_NUM 20

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

## Macro Definition Documentation

## ◆ MAX_PROF_NUM

#define MAX_PROF_NUM 20

## Function Documentation

## ◆ profileClear()

ARUTIL_EXTERN 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

## ◆ profilePrint()

ARUTIL_EXTERN void profilePrint | ( | void |  | ) |

Print all profiling buckets.

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

## ◆ profileSet()

ARUTIL_EXTERN 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

  n | The timing bucket to add to on the next call.

See also
  profileClear profilePrint