libmuscle.profiler module

class libmuscle.profiler.Profiler(manager: MMPClient)[source]

Bases: object

Collects profiling events and sends them to the manager.

record_event(event: ProfileEvent) None[source]

Record a profiling event.

This will record the event, and may flush this and previously recorded events to the manager. If the time is still running, it will be stopped. Other than this the event must be complete when it is submitted. Do not use the event object after calling this function with it.

Parameters:

event – The event to record.

set_level(level: str) None[source]

Set the detail level at which data is collected.

Parameters:

level – Either ‘none’ or ‘all’ to disable or enable sending events to the manager.

shutdown() None[source]