pydistsim.tests.test_benchmark.MyCustomMetricCollector

class MyCustomMetricCollector[source]

Bases: MetricCollector

Methods

__init__

create_report

Returns a dictionary with the collected metrics.

notify

on_added

Called when the observer is added to an observable object.

on_algorithm_finished

on_algorithm_started

on_message_delivered

on_message_sent

on_network_changed

on_node_status_changed

on_sim_state_changed

on_state_changed

on_step_done

Attributes

events

create_report()[source]

Returns a dictionary with the collected metrics.

Currently, it returns the number of messages sent, messages delivered, and quantity of status changes. Future versions may include more metrics, with better reporting capabilities.