C# Class RSG.Metrics

Class for collecting and emitting metrics messages through an IMetricsEmitter.
Mostra file Open project: Real-Serious-Games/Metrics Class Usage Examples

Public Properties

Property Type Description
eventTypeName string
floatTypeName string
incTypeName string
intTypeName string
stringTypeName string

Public Methods

Method Description
Entry ( string name, float data ) : void

Add a metrics entry that is a float.

Entry ( string name, int data ) : void

Add a metrics entry that is an integer.

Entry ( string name, string data ) : void

Add a metrics entry string.

Event ( string name ) : void

Sends an event metric to the emitter.

Flush ( ) : void

Flushes all queued metrics.

Inc ( string name ) : void

Sends an increment metric to the emitter.

Metrics ( IMetricsEmitter emitter, int batchSize = 1 ) : System
RemoveProperty ( string name ) : void

Finds the specified property and stops including it in subsequent messages.

SetProperty ( string name, string property ) : void

Set a property for all subsequent messages.

Private Methods

Method Description
QueueMetric ( Metric metric ) : void

Adds a metric to the queue.

Method Details

Entry() public method

Add a metrics entry that is a float.
public Entry ( string name, float data ) : void
name string
data float
return void

Entry() public method

Add a metrics entry that is an integer.
public Entry ( string name, int data ) : void
name string
data int
return void

Entry() public method

Add a metrics entry string.
public Entry ( string name, string data ) : void
name string
data string
return void

Event() public method

Sends an event metric to the emitter.
public Event ( string name ) : void
name string
return void

Flush() public method

Flushes all queued metrics.
public Flush ( ) : void
return void

Inc() public method

Sends an increment metric to the emitter.
public Inc ( string name ) : void
name string
return void

Metrics() public method

public Metrics ( IMetricsEmitter emitter, int batchSize = 1 ) : System
emitter IMetricsEmitter
batchSize int
return System

RemoveProperty() public method

Finds the specified property and stops including it in subsequent messages.
public RemoveProperty ( string name ) : void
name string
return void

SetProperty() public method

Set a property for all subsequent messages.
public SetProperty ( string name, string property ) : void
name string
property string
return void

Property Details

eventTypeName public_oe static_oe property

public static string eventTypeName
return string

floatTypeName public_oe static_oe property

public static string floatTypeName
return string

incTypeName public_oe static_oe property

public static string incTypeName
return string

intTypeName public_oe static_oe property

public static string intTypeName
return string

stringTypeName public_oe static_oe property

public static string stringTypeName
return string