Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Types | Private Attributes
Dali::Internal::Adaptor::FrameTimeStats Struct Reference

Used to get statistics about time stamps over a period of time. More...

#include <frame-time-stats.h>

Collaboration diagram for Dali::Internal::Adaptor::FrameTimeStats:
Collaboration graph
[legend]

Public Member Functions

 FrameTimeStats ()
 Constructor. More...
 
 ~FrameTimeStats ()
 Destructor, not intended as a base class. More...
 
void StartTime (const FrameTimeStamp &timeStamp)
 Timer start time. More...
 
void EndTime (const FrameTimeStamp &timeStamp)
 Timer end time. More...
 
void Reset ()
 Reset all internal counters / state except total time. More...
 
float GetMaxTime () const
 
float GetMinTime () const
 
float GetTotalTime () const
 
unsigned int GetRunCount () const
 Get how many times the timer has been started /stopped. More...
 
void CalculateMean (float &meanOut, float &standardDeviationOut) const
 Calculate the mean and standard deviation. More...
 

Private Types

enum  TimeState { WAITING_FOR_START_TIME, WAITING_FOR_END_TIME }
 internal time state. More...
 
typedef Dali::Vector< unsigned
int > 
Samples
 

Private Attributes

Samples mSamples
 
unsigned int mMin
 current minimum value in microseconds More...
 
unsigned int mMax
 current maximum value in microseconds More...
 
unsigned int mTotal
 current total in in microseconds More...
 
unsigned int mRunCount
 how many times the timer has been start / stopped More...
 
FrameTimeStamp mStart
 start time stamp, to calculate the diff More...
 
TimeState mTimeState:1
 time state More...
 
bool mMinMaxTimeSet:1
 whether the min-max values have been configured More...
 

Detailed Description

Used to get statistics about time stamps over a period of time.

E.g. the min, max, total and average time spent inside two markers, such as UPDATE_START and UPDATE_END

Definition at line 40 of file frame-time-stats.h.

Member Typedef Documentation

Definition at line 108 of file frame-time-stats.h.

Member Enumeration Documentation

internal time state.

Enumerator
WAITING_FOR_START_TIME 

waiting for start time marker

WAITING_FOR_END_TIME 

waiting for end time marker

Definition at line 102 of file frame-time-stats.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::FrameTimeStats::FrameTimeStats ( )

Constructor.

Definition at line 39 of file frame-time-stats.cpp.

References mSamples, Dali::Vector< T, IsTrivialType >::Reserve(), and Reset().

Here is the call graph for this function:

Dali::Internal::Adaptor::FrameTimeStats::~FrameTimeStats ( )

Destructor, not intended as a base class.

Definition at line 47 of file frame-time-stats.cpp.

Member Function Documentation

void Dali::Internal::Adaptor::FrameTimeStats::CalculateMean ( float &  meanOut,
float &  standardDeviationOut 
) const

Calculate the mean and standard deviation.

Parameters
[out]meanThe return mean value
[out]standardDeviationThe return standard deviation value

Definition at line 131 of file frame-time-stats.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), mSamples, Dali::Internal::Adaptor::anonymous_namespace{frame-time-stats.cpp}::ONE_OVER_MICROSECONDS_TO_SECONDS, and Dali::VectorBase::Size().

Referenced by Dali::Internal::Adaptor::StatContext::LogMarker().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::FrameTimeStats::EndTime ( const FrameTimeStamp timeStamp)

Timer end time.

Parameters
timeStamptime stamp

Definition at line 63 of file frame-time-stats.cpp.

References Dali::Internal::Adaptor::FrameTimeStamp::MicrosecondDiff(), mMax, mMin, mMinMaxTimeSet, mRunCount, mSamples, mStart, mTimeState, mTotal, Dali::Vector< T, IsTrivialType >::PushBack(), Reset(), WAITING_FOR_END_TIME, and WAITING_FOR_START_TIME.

Referenced by Dali::Internal::Adaptor::StatContext::RecordMarker().

Here is the call graph for this function:

Here is the caller graph for this function:

float Dali::Internal::Adaptor::FrameTimeStats::GetMaxTime ( ) const
Returns
maximum time in seconds

Definition at line 111 of file frame-time-stats.cpp.

References mMax, and Dali::Internal::Adaptor::anonymous_namespace{frame-time-stats.cpp}::ONE_OVER_MICROSECONDS_TO_SECONDS.

Referenced by Dali::Internal::Adaptor::StatContext::LogMarker().

Here is the caller graph for this function:

float Dali::Internal::Adaptor::FrameTimeStats::GetMinTime ( ) const
Returns
minimum time in seconds

Definition at line 116 of file frame-time-stats.cpp.

References mMin, and Dali::Internal::Adaptor::anonymous_namespace{frame-time-stats.cpp}::ONE_OVER_MICROSECONDS_TO_SECONDS.

Referenced by Dali::Internal::Adaptor::StatContext::LogMarker().

Here is the caller graph for this function:

unsigned int Dali::Internal::Adaptor::FrameTimeStats::GetRunCount ( ) const

Get how many times the timer has been started /stopped.

Definition at line 126 of file frame-time-stats.cpp.

References mRunCount.

float Dali::Internal::Adaptor::FrameTimeStats::GetTotalTime ( ) const
Returns
total time in second

Definition at line 121 of file frame-time-stats.cpp.

References mTotal, and Dali::Internal::Adaptor::anonymous_namespace{frame-time-stats.cpp}::ONE_OVER_MICROSECONDS_TO_SECONDS.

Referenced by Dali::Internal::Adaptor::StatContext::LogMarker().

Here is the caller graph for this function:

void Dali::Internal::Adaptor::FrameTimeStats::Reset ( )

Reset all internal counters / state except total time.

Definition at line 101 of file frame-time-stats.cpp.

References Dali::Vector< T, IsTrivialType >::Clear(), mMax, mMin, mMinMaxTimeSet, mRunCount, mSamples, mTimeState, and WAITING_FOR_START_TIME.

Referenced by EndTime(), Dali::Internal::Adaptor::StatContext::FrameTick(), FrameTimeStats(), and StartTime().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::Adaptor::FrameTimeStats::StartTime ( const FrameTimeStamp timeStamp)

Timer start time.

Parameters
timeStamptime stamp

Definition at line 51 of file frame-time-stats.cpp.

References mStart, mTimeState, Reset(), WAITING_FOR_END_TIME, and WAITING_FOR_START_TIME.

Referenced by Dali::Internal::Adaptor::StatContext::RecordMarker().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

unsigned int Dali::Internal::Adaptor::FrameTimeStats::mMax
private

current maximum value in microseconds

Definition at line 112 of file frame-time-stats.h.

Referenced by EndTime(), GetMaxTime(), and Reset().

unsigned int Dali::Internal::Adaptor::FrameTimeStats::mMin
private

current minimum value in microseconds

Definition at line 111 of file frame-time-stats.h.

Referenced by EndTime(), GetMinTime(), and Reset().

bool Dali::Internal::Adaptor::FrameTimeStats::mMinMaxTimeSet
private

whether the min-max values have been configured

Definition at line 117 of file frame-time-stats.h.

Referenced by EndTime(), and Reset().

unsigned int Dali::Internal::Adaptor::FrameTimeStats::mRunCount
private

how many times the timer has been start / stopped

Definition at line 114 of file frame-time-stats.h.

Referenced by EndTime(), GetRunCount(), and Reset().

Samples Dali::Internal::Adaptor::FrameTimeStats::mSamples
private

Definition at line 109 of file frame-time-stats.h.

Referenced by CalculateMean(), EndTime(), FrameTimeStats(), and Reset().

FrameTimeStamp Dali::Internal::Adaptor::FrameTimeStats::mStart
private

start time stamp, to calculate the diff

Definition at line 115 of file frame-time-stats.h.

Referenced by EndTime(), and StartTime().

TimeState Dali::Internal::Adaptor::FrameTimeStats::mTimeState
private

time state

Definition at line 116 of file frame-time-stats.h.

Referenced by EndTime(), Reset(), and StartTime().

unsigned int Dali::Internal::Adaptor::FrameTimeStats::mTotal
private

current total in in microseconds

Definition at line 113 of file frame-time-stats.h.

Referenced by EndTime(), and GetTotalTime().


The documentation for this struct was generated from the following files:
Dali Docs Home
Read more about Dali