Class ContinuousEvents
Continuous Events class for creating and updating events that measure some metric at a frequency and aggregate over a period.
Inherited Members
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
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, float, float, 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. |
| float | interval | The interval in which to collect the metric, in seconds. |
| float | 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 |