Photon Server API Documentation v5.0RC1

Public Member Functions | Properties | List of all members
ExitGames.Diagnostics.Counter.AverageCounter Class Reference

The average counter. More...

Inheritance diagram for ExitGames.Diagnostics.Counter.AverageCounter:
ExitGames.Diagnostics.Counter.CounterBase ExitGames.Diagnostics.Counter.ICounter

Public Member Functions

 AverageCounter ()
 Initializes a new instance of the AverageCounter class. More...
 
 AverageCounter (string name)
 Initializes a new instance of the AverageCounter class. More...
 
override long Decrement ()
 Decrements the counter. More...
 
override sealed RawCounterSample GetNextSample ()
 Gets the next sample. More...
 
override float GetNextValue ()
 Returns the average count since the last GetNextValue call. More...
 
override long Increment ()
 Increments the counter. More...
 
override long IncrementBy (long value)
 Increments the counter by a value. More...
 

Properties

override CounterType CounterType [get]
 Gets the type of the counter. More...
 
- Properties inherited from ExitGames.Diagnostics.Counter.CounterBase
abstract CounterType CounterType [get]
 Gets the type of the counter. More...
 
string Name [get]
 Gets Name. More...
 
bool IsValid [get, protected set]
 
- Properties inherited from ExitGames.Diagnostics.Counter.ICounter
CounterType CounterType [get]
 Gets the type of the counter. More...
 
string Name [get]
 Gets the name of the counter. More...
 
bool IsValid [get]
 Returns whether counter is valid or not For WindowsPerfCounters this method may return value whether counter exists or not More...
 

Additional Inherited Members

- Protected Member Functions inherited from ExitGames.Diagnostics.Counter.CounterBase
 CounterBase ()
 Initializes a new instance of the CounterBase class. More...
 
 CounterBase (string name)
 Initializes a new instance of the CounterBase class. More...
 

Detailed Description

The average counter.

GetNextValue calculates the average counter since the previous GetNextValue call.

Constructor & Destructor Documentation

◆ AverageCounter() [1/2]

ExitGames.Diagnostics.Counter.AverageCounter.AverageCounter ( )
inline

Initializes a new instance of the AverageCounter class.

◆ AverageCounter() [2/2]

ExitGames.Diagnostics.Counter.AverageCounter.AverageCounter ( string  name)
inline

Initializes a new instance of the AverageCounter class.

Parameters
nameThe counter name.

Member Function Documentation

◆ Decrement()

override long ExitGames.Diagnostics.Counter.AverageCounter.Decrement ( )
inlinevirtual

Decrements the counter.

Returns
The decremented counter.

Implements ExitGames.Diagnostics.Counter.CounterBase.

◆ GetNextSample()

override sealed RawCounterSample ExitGames.Diagnostics.Counter.AverageCounter.GetNextSample ( )
inlinevirtual

Gets the next sample.

This method is not thread safe.

Returns
A new RawCounterSample.

Implements ExitGames.Diagnostics.Counter.CounterBase.

◆ GetNextValue()

override float ExitGames.Diagnostics.Counter.AverageCounter.GetNextValue ( )
inlinevirtual

Returns the average count since the last GetNextValue call.

This method is NOT thread safe.

Returns
The new average value.

Implements ExitGames.Diagnostics.Counter.CounterBase.

◆ Increment()

override long ExitGames.Diagnostics.Counter.AverageCounter.Increment ( )
inlinevirtual

Increments the counter.

Returns
The incremented counter.

Implements ExitGames.Diagnostics.Counter.CounterBase.

◆ IncrementBy()

override long ExitGames.Diagnostics.Counter.AverageCounter.IncrementBy ( long  value)
inlinevirtual

Increments the counter by a value.

Parameters
valueThe value.
Returns
The incremented counter.

Implements ExitGames.Diagnostics.Counter.CounterBase.

Property Documentation

◆ CounterType

override CounterType ExitGames.Diagnostics.Counter.AverageCounter.CounterType
get

Gets the type of the counter.

The type of the counter.