AJA NTV2 SDK  17.1.1.1245
NTV2 SDK 17.1.1.1245
AJAPerformance Class Reference

#include <performance.h>

Public Member Functions

 AJAPerformance (const std::string &name, AJATimerPrecision precision=AJATimerPrecisionMilliseconds, uint64_t skipEntries=0)
 
 AJAPerformance (const std::string &name, const AJAPerformanceExtraMap &values, AJATimerPrecision precision=AJATimerPrecisionMilliseconds, uint64_t skipEntries=0)
 
 AJAPerformance (AJATimerPrecision precision=AJATimerPrecisionMilliseconds, uint64_t skipEntries=0)
 
 ~AJAPerformance (void)
 
void SetExtras (const AJAPerformanceExtraMap &values)
 
void Start (void)
 
void Stop (void)
 
void Report (const std::string &name="", const char *pFileName=NULL, int32_t lineNumber=-1)
 
std::string Name (void)
 
AJATimerPrecision Precision (void)
 
uint64_t Entries (void)
 
uint64_t TotalTime (void)
 
uint64_t MinTime (void)
 
uint64_t MaxTime (void)
 
double Mean (void)
 
double Variance (void)
 
double StandardDeviation (void)
 
const AJAPerformanceExtraMap Extras (void)
 

Detailed Description

Definition at line 23 of file performance.h.

Constructor & Destructor Documentation

◆ AJAPerformance() [1/3]

AJAPerformance::AJAPerformance ( const std::string &  name,
AJATimerPrecision  precision = AJATimerPrecisionMilliseconds,
uint64_t  skipEntries = 0 
)

Constructor

Parameters
[in]nameThe name for the performance object.
[in]precisionThe Precision units to use.
[in]skipEntriesThe number of entries to skip over before tracking performance, the idea here is to skip over any "warm-up" period.

Definition at line 30 of file performance.cpp.

◆ AJAPerformance() [2/3]

AJAPerformance::AJAPerformance ( const std::string &  name,
const AJAPerformanceExtraMap values,
AJATimerPrecision  precision = AJATimerPrecisionMilliseconds,
uint64_t  skipEntries = 0 
)

Constructor

Parameters
[in]nameThe name for the performance object.
[in]valuesExtra values that can be stored along with performance info.
[in]precisionThe Precision units to use.
[in]skipEntriesThe number of entries to skip over before tracking performance, the idea here is to skip over any "warm-up" period.

Definition at line 45 of file performance.cpp.

◆ AJAPerformance() [3/3]

AJAPerformance::AJAPerformance ( AJATimerPrecision  precision = AJATimerPrecisionMilliseconds,
uint64_t  skipEntries = 0 
)

Constructor

Parameters
[in]precisionThe Precision units to use.
[in]skipEntriesThe number of entries to skip over before tracking performance, the idea here is to skip over any "warm-up" period.

Definition at line 62 of file performance.cpp.

◆ ~AJAPerformance()

AJAPerformance::~AJAPerformance ( void  )

Definition at line 76 of file performance.cpp.

Member Function Documentation

◆ Entries()

uint64_t AJAPerformance::Entries ( void  )

Returns the number of times that the start/stop pair has been called

Definition at line 96 of file performance.cpp.

◆ Extras()

const AJAPerformanceExtraMap AJAPerformance::Extras ( void  )

Returns a map of any extra values stored in the performance object

Definition at line 137 of file performance.cpp.

◆ MaxTime()

uint64_t AJAPerformance::MaxTime ( void  )

Returns the maximum time between all start/stop pairs (in Precision units)

Definition at line 111 of file performance.cpp.

◆ Mean()

double AJAPerformance::Mean ( void  )

Returns the mean (average) time of all start/stop pairs (in Precision units)

Definition at line 116 of file performance.cpp.

◆ MinTime()

uint64_t AJAPerformance::MinTime ( void  )

Returns the minimum time between all start/stop pairs (in Precision units)

Definition at line 106 of file performance.cpp.

◆ Name()

std::string AJAPerformance::Name ( void  )

Returns the name for the performance object that was set in the constructor

Definition at line 91 of file performance.cpp.

◆ Precision()

AJATimerPrecision AJAPerformance::Precision ( void  )

Returns the Precision units set in the constructor

Definition at line 142 of file performance.cpp.

◆ Report()

void AJAPerformance::Report ( const std::string &  name = "",
const char *  pFileName = NULL,
int32_t  lineNumber = -1 
)

Print out a performance report to AJADebug

Parameters
[in]nameName to use in printout, if empty will use the name passed in constructor
[in]pFileNameThe source filename reporting the performace.
[in]lineNumberThe line number in the source file reporting the performance.

Definition at line 196 of file performance.cpp.

◆ SetExtras()

void AJAPerformance::SetExtras ( const AJAPerformanceExtraMap values)

Set extra values that can be stored along with performance info

Parameters
[in]valuesThe extra values to assign to this object

Definition at line 86 of file performance.cpp.

◆ StandardDeviation()

double AJAPerformance::StandardDeviation ( void  )

Returns the standard deviation of all start/stop pairs (in Precision units)

Definition at line 132 of file performance.cpp.

◆ Start()

void AJAPerformance::Start ( void  )

Start the timer of the performance object

Definition at line 147 of file performance.cpp.

◆ Stop()

void AJAPerformance::Stop ( void  )

Stop the timer of the performance object and updates the performance stats: number of entries, min time, max time, total time

Definition at line 152 of file performance.cpp.

◆ TotalTime()

uint64_t AJAPerformance::TotalTime ( void  )

Returns the total elapsed time between all start/stop pairs (in Precision units)

Definition at line 101 of file performance.cpp.

◆ Variance()

double AJAPerformance::Variance ( void  )

Returns the variance of all start/stop pairs (in Precision units)

Definition at line 121 of file performance.cpp.


The documentation for this class was generated from the following files: