Photon Server API Documentation v5.0RC1

Public Member Functions | Properties | List of all members
Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper Class Reference

Wrapper for base PerformanceCounter counter More...

Inheritance diagram for Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper:
Photon.SocketServer.Diagnostics.Counters.ICounterProvider ExitGames.Diagnostics.Counter.ICounter

Public Member Functions

 PerformanceCounterWrapper ()
 
 PerformanceCounterWrapper (PerformanceCounter performanceCounter)
 
long Increment ()
 Increments the counter by one and returns the new value. More...
 
long Decrement ()
 Decrements the counter by one. More...
 
long IncrementBy (long value)
 Increments the counter by a given value. More...
 
void Close ()
 
void Dispose ()
 
float GetNextValue ()
 Gets the next value. More...
 
object CreateCounter (PerfCounterAttribute counterAttribute, PerfCounterCategoryAttribute categoryAttribute, string instanceName, bool touch)
 Create counte instance by type and params. More...
 
CounterCreationDataCollection GetCounterCreationData (PerfCounterAttribute attribute)
 Returns counter counter creation data based on PerfCounterAttribute More...
 
object CreateFakeCounter ()
 Create simple fake(null) counter that are not backed up by any real windows counters in case we don't have permissions or disabled real counters More...
 

Properties

long RawValue [get, set]
 
CounterType CounterType [get]
 
string Name [get]
 
bool IsValid [get]
 
- 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...
 

Detailed Description

Wrapper for base PerformanceCounter counter

Constructor & Destructor Documentation

◆ PerformanceCounterWrapper() [1/2]

Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.PerformanceCounterWrapper ( )
inline

◆ PerformanceCounterWrapper() [2/2]

Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.PerformanceCounterWrapper ( PerformanceCounter  performanceCounter)
inline

Member Function Documentation

◆ Close()

void Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.Close ( )
inline

◆ CreateCounter()

object Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.CreateCounter ( PerfCounterAttribute  counterAttribute,
PerfCounterCategoryAttribute  categoryAttribute,
string  instanceName,
bool  touch 
)
inline

Create counte instance by type and params.

Parameters
counterAttribute
categoryAttribute
instanceName
touchProbe created counter with PerformanceCounter.NextValue so counter instance will be created in netcore
Returns

Implements Photon.SocketServer.Diagnostics.Counters.ICounterProvider.

◆ CreateFakeCounter()

object Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.CreateFakeCounter ( )
inline

Create simple fake(null) counter that are not backed up by any real windows counters in case we don't have permissions or disabled real counters

Returns

Implements Photon.SocketServer.Diagnostics.Counters.ICounterProvider.

◆ Decrement()

long Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.Decrement ( )
inline

Decrements the counter by one.

Returns
The decremented value.

Implements ExitGames.Diagnostics.Counter.ICounter.

◆ Dispose()

void Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.Dispose ( )
inline

◆ GetCounterCreationData()

CounterCreationDataCollection Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.GetCounterCreationData ( PerfCounterAttribute  attribute)
inline

Returns counter counter creation data based on PerfCounterAttribute

Parameters
attribute
Returns

Implements Photon.SocketServer.Diagnostics.Counters.ICounterProvider.

◆ GetNextValue()

float Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.GetNextValue ( )
inline

Gets the next value.

Returns
The get next value.

Implements ExitGames.Diagnostics.Counter.ICounter.

◆ Increment()

long Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.Increment ( )
inline

Increments the counter by one and returns the new value.

Returns
The incremented value.

Implements ExitGames.Diagnostics.Counter.ICounter.

◆ IncrementBy()

long Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.IncrementBy ( long  value)
inline

Increments the counter by a given value.

Parameters
valueThe value to be added to the counter.
Returns
The incremented value.

Implements ExitGames.Diagnostics.Counter.ICounter.

Property Documentation

◆ CounterType

CounterType Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.CounterType
get

◆ IsValid

bool Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.IsValid
get

◆ Name

string Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.Name
get

◆ RawValue

long Photon.SocketServer.Diagnostics.Counters.Wrappers.PerformanceCounterWrapper.RawValue
getset