nexxT.services.SrvProfiling module

This module provides the profiling service for nexxT, responsible for generating profiling measurements.

class nexxT.services.SrvProfiling.PortProfiling[source]

Bases: object

Simple helper class for storing profiling time points of a single port.

__init__()[source]
getSpans()[source]

Returns the profiling time points in a list.

Returns:

list of tuples containing nanosecond time points.

pause(timeNs)[source]

Called when the corresponding item is paused (another item may be started).

Parameters:

timeNs – the time point, given in nanoseconds.

Returns:

start(timeNs)[source]

Called when the corresponding item is started.

Parameters:

timeNs – the time point, given in nanoseconds.

Returns:

stop(timeNs)[source]

Called when the corresponding item is finished. The profiling information will be added to the history.

Parameters:

timeNs – the time point, given in nanoseconds.

Returns:

unpause(timeNs)[source]

Called when the corresponding item is unpaused.

Parameters:

timeNs – the time point, given in nanoseconds.

Returns:

class nexxT.services.SrvProfiling.ProfilingService[source]

Bases: QObject

This class provides a profiling service for the nexxT framework.

__init__(self, /, parent: PySide6.QtCore.QObject | None = None, *, objectName: str | None = None) None[source]

Initialize self. See help(type(self)) for accurate signature.

afterPortDataChanged(portname)[source]

This slot is called after calling onPortDataChanged.

Parameters:
  • portname – the fully qualified name of the port

  • timeNs – the timestamp

Returns:

beforePortDataChanged(portname)[source]

This slot is called before calling onPortDataChanged.

Parameters:
  • portname – the fully qualified name of the port

  • timeNs – the timestamp

Returns:

deregisterThread()[source]

This slot shall be called from each deactivated nexxT thread with a direct connection

Returns:

loadDataUpdated
registerThread()[source]

This slot shall be called from each activated nexxT thread with a direct connection.

Returns:

setLoadMonitorEnabled(enabled)[source]

Enables / disables load monitoring

Parameters:

enabled – boolean

Returns:

setPortProfilingEnabled(enabled)[source]

Enables / disables port profiling

Parameters:

enabled – boolean

Returns:

spanDataUpdated
startTimers
staticMetaObject = PySide6.QtCore.QMetaObject("ProfilingService" inherits "QObject": Methods:   #4 type=Signal, signature=loadDataUpdated(QString,QByteArray,QByteArray), parameters=QString, QByteArray, QByteArray   #5 type=Signal, signature=spanDataUpdated(QString,QString,QByteArray), parameters=QString, QString, QByteArray   #6 type=Signal, signature=threadDeregistered(QString), parameters=QString   #7 type=Signal, signature=stopTimers()   #8 type=Signal, signature=startTimers()   #9 type=Slot, signature=registerThread()   #10 type=Slot, signature=deregisterThread()   #11 type=Slot, signature=_generateRecord()   #12 type=Slot, signature=beforePortDataChanged(QString), parameters=QString   #13 type=Slot, signature=afterPortDataChanged(QString), parameters=QString )
stopTimers
threadDeregistered
class nexxT.services.SrvProfiling.ProfilingServiceDummy[source]

Bases: QObject

This class can be used as a replacement for the ProfilingService which provides the same interface.

afterPortDataChanged(portname)[source]

dummy implementation

Parameters:

portname – name of the port

beforePortDataChanged(portname)[source]

dummy implementation

Parameters:

portname – name of the port

deregisterThread()[source]

dummy implementation

registerThread()[source]

dummy implementation

staticMetaObject = PySide6.QtCore.QMetaObject("ProfilingServiceDummy" inherits "QObject": Methods:   #4 type=Slot, signature=registerThread()   #5 type=Slot, signature=deregisterThread()   #6 type=Slot, signature=beforePortDataChanged(QString), parameters=QString   #7 type=Slot, signature=afterPortDataChanged(QString), parameters=QString )
class nexxT.services.SrvProfiling.ThreadSpecificProfItem[source]

Bases: object

This class contains all profiling items of a specific thread.

THREAD_PROFILING_PERIOD_SEC = 0.3
THREAD_PROFILING_TOTAL_TIME = 60
__init__()[source]
cancel()[source]

Cancel profiling on user-request and reset the corresponding data.

Returns:

getLoad()[source]

Returns the load measurements.

Returns:

list of 2-tuples (time_nano_seconds, load_ratio)

getSpans()[source]

Get the current port profiling data.

Returns:

dict mapping thread names to lists of tuples with nano-second time points.

registerPortChangeFinished(portname, timeNs)[source]

Called when the onPortDataChanged function has finished.

Parameters:
  • portname – the full-qualified port name

  • timeNs – the time in nano-seconds

Returns:

registerPortChangeStarted(portname, timeNs)[source]

Called when starting the onPortDataChanged function.

Parameters:
  • portname – the full-qualified port name

  • timeNs – the time in nano-seconds

Returns:

update()[source]

Updates the load profiling.

Returns: