elkpy.TimingController#

class elkpy.timingcontroller.TimingController(address='localhost:51051', sushi_proto_def='/usr/share/sushi/sushi_rpc.proto')[source]#

Bases: object

A class to control the timing in sushi via gRPC. It can get and reset the different timing statistics provided by sushi.

Attributes:

_stub (TimingControllerStub): Connection stubs to the gRPC timing interface implemented in sushi.

get_engine_timings() -> (<class 'float'>, <class 'float'>, <class 'float'>)[source]#

Get the average, min and max timings of the engine.

Returns:

float: The average engine processing time in ms. float: The minimum engine processing time in ms. float: The maximum engine processing time in ms.

get_processor_timings(processor_identifier: int) -> (<class 'float'>, <class 'float'>, <class 'float'>)[source]#

Get the average, min and max timings of the specified processor.

Parameters:

processor_identifier (int): The id of the processor to get timings from.

Returns:

float: The average processor processing time in ms. float: The minimum processor processing time in ms. float: The maximum processor processing time in ms.

get_timings_enabled() bool[source]#

Get the state of timing statstics.

Returns:

bool: True if statistics is enabled, False if not.

get_track_timings(track_identifier: int) -> (<class 'float'>, <class 'float'>, <class 'float'>)[source]#

Get the average, min and max timings of the specified track.

Parameters:

track_identifier (int): The id of the track to get timings from.

Returns:

float: The average track processing time in ms. float: The minimum track processing time in ms. float: The maximum track processing time in ms.

reset_all_timings() None[source]#

Reset all the timings.

reset_processor_timings(processor_identifier: int) None[source]#

Reset the timings of the specified processor.

Parameters:

processor_identifier (int): The id of the processor to reset the timings of.

reset_track_timings(track_identifier: int) None[source]#

Reset the timings of the specified track.

Parameters:

track_identifier (int): The id of the track to reset the timings of.

set_timings_enabled(enabled: bool) None[source]#

Set the state of timing statstics.

Parameters:

bool: True if statistics is enabled, False if not.