Class ContinuousEvents
Continuous Events class for creating and updating events that measure some metric at a frequency and aggregate over a period.
Namespace: Unity.Simulation
Syntax
public static class ContinuousEvents
Methods
AddEvent(EventBase)
Add an event to be measure according to its frequency.
Declaration
public static void AddEvent(EventBase e)
Parameters
Type | Name | Description |
---|---|---|
EventBase | e |
Create(String, Single, Single, ContinuousEvents.EventCollectionDelegate)
Create a continuous event at a particular frequency, aggregated over a period.
Declaration
public static AggregationEvent Create(string name, float interval, float period, ContinuousEvents.EventCollectionDelegate collector)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the event. |
Single | interval | The interval in which to collect the metric, in seconds. |
Single | period | The aggregation period in seconds. |
ContinuousEvents.EventCollectionDelegate | collector | A delegate to collect the metric. |
Returns
Type | Description |
---|---|
AggregationEvent | A newly constructed Event instance. |
DefaultDispatchDelegate(AggregationEvent)
The default dispatcher, which just logs to the console.
Declaration
public static void DefaultDispatchDelegate(AggregationEvent e)
Parameters
Type | Name | Description |
---|---|---|
AggregationEvent | e |
RemoveEvent(EventBase)
Removes an event from being collected.
Declaration
public static void RemoveEvent(EventBase e)
Parameters
Type | Name | Description |
---|---|---|
EventBase | e |