Melee Modding Library  2.0.0
A C library for modding Super Smash Bros Melee
Data Structures | Macros | Functions
profile.h File Reference

Measure performance of code. More...

#include "gctypes.h"

Go to the source code of this file.

Data Structures

struct  Profile
 key information about code performance More...
 

Macros

#define DEFAULT_PROFILE   {0, 0xFFFFFFFF, 0, 0, 0}
 

Functions

void startTrial (Profile *prof)
 Start timing your code. More...
 
void endTrial (Profile *prof)
 Finish timing your code. More...
 
void printProfile (Profile *prof)
 Print stats about your code performance. More...
 

Detailed Description

Measure performance of code.


Data Structure Documentation

struct Profile

key information about code performance

Data Fields
u32 maxTicks

maximum number of ticks elapsed

u32 minTicks

minimum number of ticks elapsed

u32 avgTicks

average number of ticks elapsed

u32 numTrials

number of trials recorded

u32 startTick

used locally for measuring (end - start)

Macro Definition Documentation

#define DEFAULT_PROFILE   {0, 0xFFFFFFFF, 0, 0, 0}

Use to initialize Profile struct

Function Documentation

void startTrial ( Profile prof)

Start timing your code.

Parameters
prof- Pointer to a profile
Returns
None
void endTrial ( Profile prof)

Finish timing your code.

Parameters
prof- Pointer to a profile
Returns
None
void printProfile ( Profile prof)

Print stats about your code performance.

Parameters
prof- Pointer to a profile
Returns
None