mNetworkControl(0),
mFpsFrequency(0),
mUpdateStatusFrequency(0),
+ mObjectProfilerInterval( 0 ),
mPerformanceStatsLevel(0),
- mPerformanceStatsFrequency( DEFAULT_STATISTICS_LOG_FREQUENCY),
+ mPerformanceStatsFrequency( DEFAULT_STATISTICS_LOG_FREQUENCY ),
mPerformanceTimeStampOutput(0),
mPanGestureLoggingLevel(0),
mPanGesturePredictionMode(-1),
return mUpdateStatusFrequency;
}
+unsigned int EnvironmentOptions::GetObjectProfilerInterval() const
+{
+ return mObjectProfilerInterval;
+}
+
unsigned int EnvironmentOptions::GetPerformanceStatsLoggingOptions() const
{
return mPerformanceStatsLevel;
bool EnvironmentOptions::PerformanceServerRequired() const
{
- return ( (GetPerformanceStatsLoggingOptions() > 0) ||
+ return ( ( GetPerformanceStatsLoggingOptions() > 0) ||
( GetPerformanceTimeStampOutput() > 0 ) ||
( GetNetworkControlMode() > 0) );
}
// get logging options
mFpsFrequency = GetIntegerEnvironmentVariable( DALI_ENV_FPS_TRACKING, 0 );
mUpdateStatusFrequency = GetIntegerEnvironmentVariable( DALI_ENV_UPDATE_STATUS_INTERVAL, 0 );
+ mObjectProfilerInterval = GetIntegerEnvironmentVariable( DALI_ENV_OBJECT_PROFILER_INTERVAL, 0 );
mPerformanceStatsLevel = GetIntegerEnvironmentVariable( DALI_ENV_LOG_PERFORMANCE_STATS, 0 );
mPerformanceStatsFrequency = GetIntegerEnvironmentVariable( DALI_ENV_LOG_PERFORMANCE_STATS_FREQUENCY, 0 );
mPerformanceTimeStampOutput = GetIntegerEnvironmentVariable( DALI_ENV_PERFORMANCE_TIMESTAMP_OUTPUT, 0 );
unsigned int GetUpdateStatusLoggingFrequency() const;
/**
+ * @return object profiler status interval ( 0 == off )
+ */
+ unsigned int GetObjectProfilerInterval() const;
+
+ /**
* @return performance statistics log level ( 0 == off )
*/
unsigned int GetPerformanceStatsLoggingOptions() const;
unsigned int mNetworkControl; ///< whether network control is enabled
unsigned int mFpsFrequency; ///< how often fps is logged out in seconds
unsigned int mUpdateStatusFrequency; ///< how often update status is logged out in frames
+ unsigned int mObjectProfilerInterval; ///< how often object counts are logged out in seconds
unsigned int mPerformanceStatsLevel; ///< performance statistics logging bitmask
unsigned int mPerformanceStatsFrequency; ///< performance statistics logging frequency (seconds)
unsigned int mPerformanceTimeStampOutput; ///< performance time stamp output ( bitmask)
// environment variable for enabling/disabling fps tracking
#define DALI_ENV_UPDATE_STATUS_INTERVAL "DALI_UPDATE_STATUS_INTERVAL"
+#define DALI_ENV_OBJECT_PROFILER_INTERVAL "DALI_OBJECT_PROFILER_INTERVAL"
+
#define DALI_ENV_LOG_PAN_GESTURE "DALI_LOG_PAN_GESTURE"
#define DALI_ENV_PAN_PREDICTION_MODE "DALI_PAN_PREDICTION_MODE"
mCore = Integration::Core::New( *this, *mPlatformAbstraction, *mGLES, *eglSyncImpl, *mGestureManager, dataRetentionPolicy );
- mObjectProfiler = new ObjectProfiler();
+ const unsigned int timeInterval = mEnvironmentOptions->GetObjectProfilerInterval();
+ if( 0u < timeInterval )
+ {
+ mObjectProfiler = new ObjectProfiler( timeInterval );
+ }
mNotificationTrigger = new TriggerEvent( MakeCallback( this, &Adaptor::ProcessCoreEvents ) );
namespace Adaptor
{
-ObjectProfiler::ObjectProfiler()
-: mIsActive(false)
+ObjectProfiler::ObjectProfiler( unsigned int timeInterval )
{
// This class must be created after the Stage; this means it doesn't count the initial objects
// that are created by the stage (base layer, default camera actor)
mObjectRegistry = Dali::Stage::GetCurrent().GetObjectRegistry();
- char* profile = getenv("PROFILE_DALI_OBJECTS");
- if( profile != NULL )
- {
- mIsActive = true;
- int timeInterval = atoi(profile);
- if( timeInterval > 0 )
- {
- mTimer = Dali::Timer::New(timeInterval*1000);
- mTimer.TickSignal().Connect( this, &ObjectProfiler::OnTimeout );
- mTimer.Start();
- }
+ mTimer = Dali::Timer::New( timeInterval * 1000 );
+ mTimer.TickSignal().Connect( this, &ObjectProfiler::OnTimeout );
+ mTimer.Start();
- mObjectRegistry.ObjectCreatedSignal().Connect( this, &ObjectProfiler::OnObjectCreated );
- mObjectRegistry.ObjectDestroyedSignal().Connect( this, &ObjectProfiler::OnObjectDestroyed );
- }
+ mObjectRegistry.ObjectCreatedSignal().Connect( this, &ObjectProfiler::OnObjectCreated );
+ mObjectRegistry.ObjectDestroyedSignal().Connect( this, &ObjectProfiler::OnObjectDestroyed );
}
ObjectProfiler::~ObjectProfiler()
class ObjectProfiler : public ConnectionTracker
{
public:
+
/**
* Constructor
+ * @param timeInterval to specify the frequency of reporting
*/
- ObjectProfiler();
+ ObjectProfiler( unsigned int timeInterval );
/**
* Destructor
Dali::Timer mTimer;
InstanceCountMap mInstanceCountMap;
InstanceTypes mInstanceTypes;
- bool mIsActive;
};
} // Adaptor