infrastructure#

eclypse.report.metrics.metric.infrastructure(fn_or_class=None, *, name=None, activates_on='enact', trigger_every_ms=None, max_triggers=1000000000, triggers=None, trigger_condition='any', report='csv', remote=False, verbose=False)[source]#

Decorator to create an infrastructure metric.

Parameters:
  • fn_or_class (Callable | None, optional) – The function or class to decorate as an event. Defaults to None.

  • name (str | None, optional) – The name of the event. If not provided, the name will be derived from the function or class name. Defaults to None.

  • activates_on (ActivatesOnType, optional) – The events that will trigger the metric. Defaults to DRIVING_EVENT.

  • trigger_every_ms (float | None, optional) – The time in milliseconds between each trigger of the event. Defaults to None.

  • max_triggers (int | None, optional) – The maximum number of times the event can be triggered. Defaults to no limit.

  • triggers (Trigger | list[Trigger] | None, optional) – The triggers that will trigger the event. If not provided, the event will not be triggered by any triggers. Defaults to None.

  • trigger_condition (str | None) – The condition for the triggers to fire the event. If “any”, the event fires if any trigger is active. If “all”, the event fires only if all triggers are active. Defaults to “any”.

  • report (str | list[str] | None, optional) – The type of report to generate for the event. If not provided, the default report type will be used. Defaults to DEFAULT_REPORT_TYPE.

  • remote (bool, optional) – Whether the event is remote. Defaults to False.

  • verbose (bool, optional) – Whether to print verbose output. Defaults to False.

Returns:

The decorated function.

Return type:

Callable