Photon Server API Documentation v5.0RC1

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

An ICounter that wraps a windows PerformanceCounter. More...

Inheritance diagram for ExitGames.Diagnostics.Counter.WindowsPerformanceCounter:
ExitGames.Diagnostics.Counter.ICounter

Public Member Functions

 WindowsPerformanceCounter (PerformanceCounter counter)
 Initializes a new instance of the WindowsPerformanceCounter class. More...
 
 WindowsPerformanceCounter (string name, PerformanceCounter counter)
 Initializes a new instance of the WindowsPerformanceCounter class. More...
 
long Decrement ()
 Decrements the counter. More...
 
float GetNextValue ()
 Gets the next value. More...
 
long Increment ()
 Increments the counter. More...
 
long IncrementBy (long value)
 Increments the counter by a value. More...
 

Static Public Member Functions

static WindowsPerformanceCounter CreateCounter (string name, string categoryName, string counterName)
 Create a new instance of WindowsPerformanceCounter. More...
 
static WindowsPerformanceCounter CreateCounter (string name, string categoryName, string counterName, string instanceName)
 Create a new instance of WindowsPerformanceCounter. More...
 

Properties

CounterType CounterType [get]
 Gets the type of the counter. More...
 
string Name [get]
 Gets the counter name. More...
 
bool IsValid [get]
 
long Value [get, set]
 Gets or sets the PerformanceCounter.RawValue. More...
 
- 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

An ICounter that wraps a windows PerformanceCounter.

Constructor & Destructor Documentation

◆ WindowsPerformanceCounter() [1/2]

ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.WindowsPerformanceCounter ( PerformanceCounter  counter)
inline

Initializes a new instance of the WindowsPerformanceCounter class.

Parameters
counterThe counter.

◆ WindowsPerformanceCounter() [2/2]

ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.WindowsPerformanceCounter ( string  name,
PerformanceCounter  counter 
)
inline

Initializes a new instance of the WindowsPerformanceCounter class.

Parameters
nameThe name.
counterThe counter.

Member Function Documentation

◆ CreateCounter() [1/2]

static WindowsPerformanceCounter ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.CreateCounter ( string  name,
string  categoryName,
string  counterName 
)
inlinestatic

Create a new instance of WindowsPerformanceCounter.

Parameters
nameThe counter.
categoryNameThe windows performance counter category name.
counterNameThe windows performance counter name.
Returns
A new instance of WindowsPerformanceCounter.

◆ CreateCounter() [2/2]

static WindowsPerformanceCounter ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.CreateCounter ( string  name,
string  categoryName,
string  counterName,
string  instanceName 
)
inlinestatic

Create a new instance of WindowsPerformanceCounter.

Parameters
nameThe counter.
categoryNameThe windows performance counter category name.
counterNameThe windows performance counter name.
instanceNameThe windows performance counter instance Name.
Returns
A new instance of WindowsPerformanceCounter.

◆ Decrement()

long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Decrement ( )
inline

Decrements the counter.

Returns
The new value.

Implements ExitGames.Diagnostics.Counter.ICounter.

◆ GetNextValue()

float ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.GetNextValue ( )
inline

Gets the next value.

Returns
The next value.

Implements ExitGames.Diagnostics.Counter.ICounter.

◆ Increment()

long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Increment ( )
inline

Increments the counter.

Returns
The new value.

Implements ExitGames.Diagnostics.Counter.ICounter.

◆ IncrementBy()

long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.IncrementBy ( long  value)
inline

Increments the counter by a value.

Parameters
valueThe value.
Returns
The new value.

Implements ExitGames.Diagnostics.Counter.ICounter.

Property Documentation

◆ CounterType

CounterType ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.CounterType
get

Gets the type of the counter.

The type of the counter.

◆ IsValid

bool ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.IsValid
get

◆ Name

string ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Name
get

Gets the counter name.

◆ Value

long ExitGames.Diagnostics.Counter.WindowsPerformanceCounter.Value
getset

Gets or sets the PerformanceCounter.RawValue.