Workspace 6.21.5
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
ExecutionTimekeeper Class Reference

This class is a singleton and receives all notifications about operations' execution. It then sends a signal notifying the event. Any component wishing to make use of the operations' execution events should connect to this singleton and watch for the signal.

#include <Workspace/DataExecution/Execution/executiontimekeeper.h>

Inherits QObject.

Classes

class  Event
 Event to be passed around. More...
 
class  Publisher
 Process that can publish their profiling data. More...
 

Public Types

enum  ControlType {
  None = 0 , SpecifiedInWorkflows = 1 , AllOperations = 2 , CodeBlocks = 4 ,
  MaxControlType = 255
}
 
using EventList = QList< Event >
 
enum  EventType {
  InvalidEvent = 0 , ExecuteStarting , ExecuteSucceeded , ExecuteFailed ,
  UpdateWidgetStarting , UpdateWidgetSucceeded , UpdateWidgetFailed , UpdateDataStarting ,
  UpdateDataSucceeded , UpdateDataFailed , CodeBlockBegin , CodeBlockEnd ,
  MaxEventType = 255
}
 
enum  ObjectType {
  InvalidObject = 0 , OperationObject , WorkspaceObject , WidgetObject ,
  CodeBlockObject , MaxObjectType = 255
}
 
typedef QList< PublisherPublisherList
 

Signals

void notifyTimeEvents (EventList eventList, bool offlineMode)
 

Public Member Functions

void appendEventListFromHost (const EventList &eventList, const QString &hostName)
 
bool getIsSubscriber () const
 
PublisherList getPublisherList () const
 
bool loadEventsFromFile (const QString &fileName)
 
void logTimeEvent (const Operation &operation, ObjectType objectType, EventType eventType, qint64 timeStamp)
 
void logTimeEvent (const QString &codeBlockTag, ObjectType objectType, EventType eventType, const QString &fileName, const QString &funcName)
 
void logTimeEvent (Widgets::QWidgetConnector &widgetConnector, ObjectType objectType, EventType eventType, qint64 timeStamp)
 
void setIsSubscriber (bool isSubscriber)
 
void setProfilingFor (ControlType controlType)
 
bool startFileLogger (const QString &fileName)
 
void stopFileLogger ()
 
void subscribeTo (const Publisher &publisher)
 
void unsubscribe ()
 

Static Public Member Functions

static ExecutionTimekeepergetInstance ()
 

Protected Member Functions

void offloadEventList (const EventList &eventList)
 

Member Typedef Documentation

◆ EventList

using EventList = QList<Event>

◆ PublisherList

typedef QList<Publisher> PublisherList

Member Enumeration Documentation

◆ ControlType

Enumerator
None 
SpecifiedInWorkflows 
AllOperations 
CodeBlocks 
MaxControlType 

◆ EventType

enum EventType
Enumerator
InvalidEvent 
ExecuteStarting 
ExecuteSucceeded 
ExecuteFailed 
UpdateWidgetStarting 
UpdateWidgetSucceeded 
UpdateWidgetFailed 
UpdateDataStarting 
UpdateDataSucceeded 
UpdateDataFailed 
CodeBlockBegin 
CodeBlockEnd 
MaxEventType 

◆ ObjectType

enum ObjectType
Enumerator
InvalidObject 
OperationObject 
WorkspaceObject 
WidgetObject 
CodeBlockObject 
MaxObjectType 

Member Function Documentation

◆ appendEventListFromHost()

void appendEventListFromHost ( const EventList eventList,
const QString &  hostName 
)

◆ getInstance()

ExecutionTimekeeper & getInstance ( )
static

◆ getIsSubscriber()

bool getIsSubscriber ( ) const

◆ getPublisherList()

ExecutionTimekeeper::PublisherList getPublisherList ( ) const

◆ loadEventsFromFile()

bool loadEventsFromFile ( const QString &  fileName)

◆ logTimeEvent() [1/3]

void logTimeEvent ( const Operation operation,
ObjectType  objectType,
EventType  eventType,
qint64  timeStamp 
)

◆ logTimeEvent() [2/3]

void logTimeEvent ( const QString &  codeBlockTag,
ObjectType  objectType,
EventType  eventType,
const QString &  fileName,
const QString &  funcName 
)

◆ logTimeEvent() [3/3]

void logTimeEvent ( Widgets::QWidgetConnector widgetConnector,
ObjectType  objectType,
EventType  eventType,
qint64  timeStamp 
)

◆ notifyTimeEvents

void notifyTimeEvents ( EventList  eventList,
bool  offlineMode 
)
signal

◆ offloadEventList()

void offloadEventList ( const EventList eventList)
protected

◆ setIsSubscriber()

void setIsSubscriber ( bool  isSubscriber)

◆ setProfilingFor()

void setProfilingFor ( ControlType  controlType)

◆ startFileLogger()

bool startFileLogger ( const QString &  fileName)

◆ stopFileLogger()

void stopFileLogger ( )

◆ subscribeTo()

void subscribeTo ( const Publisher publisher)

◆ unsubscribe()

void unsubscribe ( )