Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Private Member Functions
Dali::Internal::Adaptor::PerformanceInterface Class Referenceabstract

Abstract Performance Interface. More...

#include <performance-interface.h>

Inheritance diagram for Dali::Internal::Adaptor::PerformanceInterface:
Inheritance graph
[legend]

Public Types

enum  StatisticsLogOptions {
  DISABLED = 0, LOG_EVERYTHING = 1 << 0, LOG_UPDATE_RENDER = 1 << 1, LOG_EVENT_PROCESS = 1 << 2,
  LOG_CUSTOM_MARKERS = 1 << 3
}
 bitmask of statistics logging options. More...
 
enum  TimeStampOutput {
  NO_TIME_STAMP_OUTPUT = 0, OUTPUT_DALI_LOG = 1 << 0, OUTPUT_KERNEL_TRACE = 1 << 1, OUTPUT_SYSTEM_TRACE = 1 << 2,
  OUTPUT_NETWORK = 1 << 3
}
 bitmask of time stamp output options. More...
 
enum  MarkerType {
  VSYNC = 0, UPDATE_START, UPDATE_END, RENDER_START,
  RENDER_END, SWAP_START, SWAP_END, PROCESS_EVENTS_START,
  PROCESS_EVENTS_END, PAUSED, RESUME, START,
  END
}
 enum for difference performance markers. More...
 
typedef unsigned short ContextId
 Type to represent a context ID. More...
 

Public Member Functions

 PerformanceInterface ()
 Constructor. More...
 
virtual ~PerformanceInterface ()
 Virtual destructor. More...
 
virtual ContextId AddContext (const char *name)=0
 Add a new context with a given name. More...
 
virtual void RemoveContext (ContextId contextId)=0
 Remove a context from use. More...
 
virtual void AddMarker (MarkerType markerType)=0
 Add a performance marker This function can be called from ANY THREAD. More...
 
virtual void AddMarker (MarkerType markerType, ContextId contextId)=0
 Add a performance marker for a used defined context This function can be called from ANY THREAD. More...
 
virtual void SetLogging (unsigned int statisticsLogOptions, unsigned int timeStampOutput, unsigned int logFrequency)=0
 Set the logging level and frequency. More...
 
virtual void SetLoggingFrequency (unsigned int logFrequency, ContextId contextId)=0
 Set the logging frequency for an individual context. More...
 
virtual void EnableLogging (bool enable, ContextId contextId)=0
 Set logging on or off for a particular context. More...
 

Private Member Functions

 PerformanceInterface (const PerformanceInterface &)
 
PerformanceInterfaceoperator= (const PerformanceInterface &)
 

Detailed Description

Abstract Performance Interface.

Used by the Adaptor to store performance metrics.

Definition at line 35 of file performance-interface.h.

Member Typedef Documentation

Type to represent a context ID.

Definition at line 39 of file performance-interface.h.

Member Enumeration Documentation

enum for difference performance markers.

Please modify the name lookup table in performance-interface.cpp file if adding new markers (the order must match one to one).

Enumerator
VSYNC 

V-Sync.

UPDATE_START 

Update start.

UPDATE_END 

Update end.

RENDER_START 

Render start.

RENDER_END 

Render end.

SWAP_START 

SwapBuffers Start.

SWAP_END 

SwapBuffers End.

PROCESS_EVENTS_START 

Process events start (e.g. touch event)

PROCESS_EVENTS_END 

Process events end.

PAUSED 

Pause start.

RESUME 

Resume start.

START 

The start of custom tracking.

END 

The end of custom tracking.

Definition at line 87 of file performance-interface.h.

bitmask of statistics logging options.

Used for output data like min/max/average time spent in event, update,render and custom tasks. E.g. Event, min 0.04 ms, max 5.27 ms, total (0.1 secs), avg 0.28 ms, std dev 0.73 ms Update, min 0.29 ms, max 0.91 ms, total (0.5 secs), avg 0.68 ms, std dev 0.15 ms Render, min 0.33 ms, max 0.97 ms, total (0.6 secs), avg 0.73 ms, std dev 0.17 ms TableViewInit, min 76.55 ms, max 76.55 ms, total (0.1 secs), avg 76.55 ms, std dev 0.00 ms

Enumerator
DISABLED 
LOG_EVERYTHING 

Bit 0 (1), log all statistics to the DALi log.

LOG_UPDATE_RENDER 

Bit 1 (2), log update and render statistics to the DALi log.

LOG_EVENT_PROCESS 

Bit 2 (4), log event task statistics to the DALi log.

LOG_CUSTOM_MARKERS 

Bit 3 (8), log custom marker statistics to the DALi log.

Definition at line 50 of file performance-interface.h.

bitmask of time stamp output options.

E.g. DALI_PERFORMANCE_TIMESTAMP_OUTPUT = 1 dali-demo Used for logging out time stamped markers for detailed analysis (see MarkerType, for the markers logged) Typical output would look like: 379.059025 (seconds), V_SYNC 379.059066 (seconds), UPDATE_START 379.059747 (seconds), UPDATE_END 379.059820 (seconds), RENDER_START 379.060708 (seconds), RENDER_END 379.075795 (seconds), V_SYNC 379.076444 (seconds), MY_CUSTOM_MARKER_START ( customer marker using PerformanceLogger public API). 379.077353 (seconds), MY_CUSTOM_MARKER_END ( customer marker using PerformanceLogger public API).

Enumerator
NO_TIME_STAMP_OUTPUT 
OUTPUT_DALI_LOG 

Bit 0 (1), log markers to DALi log.

OUTPUT_KERNEL_TRACE 

Bit 1 (2), log makers to kernel trace.

OUTPUT_SYSTEM_TRACE 

Bit 2 (4), log markers to system trace.

OUTPUT_NETWORK 

Bit 3 (8), log markers to network client.

Definition at line 73 of file performance-interface.h.

Constructor & Destructor Documentation

Dali::Internal::Adaptor::PerformanceInterface::PerformanceInterface ( )
inline

Constructor.

Definition at line 107 of file performance-interface.h.

virtual Dali::Internal::Adaptor::PerformanceInterface::~PerformanceInterface ( )
inlinevirtual

Virtual destructor.

Definition at line 112 of file performance-interface.h.

Dali::Internal::Adaptor::PerformanceInterface::PerformanceInterface ( const PerformanceInterface )
private

Member Function Documentation

virtual ContextId Dali::Internal::Adaptor::PerformanceInterface::AddContext ( const char *  name)
pure virtual

Add a new context with a given name.

Parameters
[in]nameThe name of the context
Returns
Return the unique id for this context

Implemented in Dali::Internal::Adaptor::PerformanceServer.

Referenced by Dali::Internal::Adaptor::PerformanceLogger::PerformanceLogger().

Here is the caller graph for this function:

virtual void Dali::Internal::Adaptor::PerformanceInterface::AddMarker ( MarkerType  markerType)
pure virtual

Add a performance marker This function can be called from ANY THREAD.

The default context 0 Event/Update/Render is assumed.

Parameters
[in]markerTypeperformance marker type

Implemented in Dali::Internal::Adaptor::PerformanceServer.

Referenced by Dali::Internal::Adaptor::PerformanceLogger::AddMarker(), Dali::Internal::Adaptor::SingleThreadController::AddPerformanceMarker(), Dali::Internal::Adaptor::CombinedUpdateRenderController::AddPerformanceMarker(), Dali::Internal::Adaptor::ThreadSynchronization::AddPerformanceMarker(), and Dali::Internal::Adaptor::Adaptor::ProcessCoreEvents().

Here is the caller graph for this function:

virtual void Dali::Internal::Adaptor::PerformanceInterface::AddMarker ( MarkerType  markerType,
ContextId  contextId 
)
pure virtual

Add a performance marker for a used defined context This function can be called from ANY THREAD.

Parameters
[in]markerTypeperformance marker type
[in]contextIdThe context of the marker. This must be one generated by AddContext.

Implemented in Dali::Internal::Adaptor::PerformanceServer.

virtual void Dali::Internal::Adaptor::PerformanceInterface::EnableLogging ( bool  enable,
ContextId  contextId 
)
pure virtual

Set logging on or off for a particular context.

Parameters
[in]enableEnable logging or not
[in]contextIdThe id of the context to log. This must be one generated by AddContext.

Implemented in Dali::Internal::Adaptor::PerformanceServer.

Referenced by Dali::Internal::Adaptor::PerformanceLogger::EnableLogging().

Here is the caller graph for this function:

PerformanceInterface& Dali::Internal::Adaptor::PerformanceInterface::operator= ( const PerformanceInterface )
private
virtual void Dali::Internal::Adaptor::PerformanceInterface::RemoveContext ( ContextId  contextId)
pure virtual

Remove a context from use.

Parameters
[in]contextIdThe ID of the context to remove

Implemented in Dali::Internal::Adaptor::PerformanceServer.

Referenced by Dali::Internal::Adaptor::PerformanceLogger::~PerformanceLogger().

Here is the caller graph for this function:

virtual void Dali::Internal::Adaptor::PerformanceInterface::SetLogging ( unsigned int  statisticsLogOptions,
unsigned int  timeStampOutput,
unsigned int  logFrequency 
)
pure virtual

Set the logging level and frequency.

Parameters
[in]StatisticsLogOptions0 = disabled, >0 bitmask of StatisticsLogOptions
[in]timeStampOutput0 = disabled, > 0 bitmask of TimeStampOutput options.
[in]logFrequencyhow often to log out in seconds

Implemented in Dali::Internal::Adaptor::PerformanceServer.

virtual void Dali::Internal::Adaptor::PerformanceInterface::SetLoggingFrequency ( unsigned int  logFrequency,
ContextId  contextId 
)
pure virtual

Set the logging frequency for an individual context.

Parameters
[in]logFrequencyhow often to log out in seconds

Implemented in Dali::Internal::Adaptor::PerformanceServer.

Referenced by Dali::Internal::Adaptor::PerformanceLogger::SetLoggingFrequency().

Here is the caller graph for this function:


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