The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CSharedMemoryMutexPerformanceMonitorCounters Class Reference

Inheritance diagram for CSharedMemoryMutexPerformanceMonitorCounters:
Collaboration diagram for CSharedMemoryMutexPerformanceMonitorCounters:

List of all members.

Public Types

typedef LONG InstanceId
 An instance id.

Public Member Functions

 CSharedMemoryMutexPerformanceMonitorCounters (const JetByteTools::Win32::IKernelObjectName &name, const CPerformanceDataSchema &schema, DWORD firstCounterIndex, SECURITY_ATTRIBUTES *pSecurityAttributes=nullptr)
 CSharedMemoryMutexPerformanceMonitorCounters (const CSharedMemoryMutexPerformanceMonitorCounters &rhs)
 ~CSharedMemoryMutexPerformanceMonitorCounters () override
CSharedMemoryMutexPerformanceMonitorCountersoperator= (const CSharedMemoryMutexPerformanceMonitorCounters &rhs)
JetByteTools::Core::ILockableObjectGetLock ()
IPerformanceDataBlockGetDataBlock ()
ObjectId GetPerformanceObject (const JetByteTools::Core::_tstring &objectName) const
 Returns the object id of the specified performance object. Note that the object must have been defined in the schema used to construct this object. The name is the object's name in the schema's default language.
DWORD GetMaxInstanceNameLength (const JetByteTools::Core::_tstring &objectName) const
 Returns the maximum allowable instance name length for an object of the specified name. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.
DWORD GetNumberOfInstancesAllocated (const JetByteTools::Core::_tstring &objectName) const
 Returns the number of instances currently allocated of objects of the specified name.
ObjectId AllocatePerformanceObjectInstance (const JetByteTools::Core::_tstring &objectName, const JetByteTools::Core::_tstring &instanceName, bool alwaysResetCounters=false)
 Returns the object id of the specific instance of the specific performance object. If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.
ObjectId AllocatePerformanceObjectInstance (const JetByteTools::Core::_tstring &objectName, const InstanceId &instanceId, bool alwaysResetCounters=false)
 Returns the object id of the specific instance of the specific performance object. If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by instance id in the schema used to construct this object. The name is the object's name in the schema's default language.
ObjectId AllocateChildPerformanceObjectInstance (const JetByteTools::Core::_tstring &objectName, const JetByteTools::Core::_tstring &instanceName, const ObjectId &parentObjectId, bool alwaysResetCounters=false)
 Returns the object id of the specific instance of the specific performance object with the specific parent. If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.
void ResetPerformanceObjectInstance (const ObjectId &objectId)
 Returns the object id of the specific instance of the specific performance object with the specific parent. Looks at the parent's object name and extracts the instance, if any, and creates the child object instance in the same object instance as the parent... If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.
void ReleasePerformanceObjectInstance (const ObjectId &objectId)
 Releases a performance object. If this is an object with instances then the instance is now available for reuse.
CounterId GetPerformanceCounter (const ObjectId &objectId, const JetByteTools::Core::_tstring &counterName) const
 Returns the counter id of the specific counter. Note that the counter must have been defined in the schema used to construct this object. The name is the counter's name in the schema's default language.
bool GetInstanceNamesForObject (const JetByteTools::Core::_tstring &objectName, JetByteTools::Core::StringVector &instanceNames) const
LONGAccessPerformanceCounter32 (const CounterId &counter)
 Returns a writable 32-bit value for the specific counter id.
void SetPerformanceCounter32 (const CounterId &counter, LONG value)
 Sets the specified counter to the supplied value.
__int64 & AccessPerformanceCounter64 (const CounterId &counter)
 Returns a writable 64-bit value for the specific counter id.
void SetPerformanceCounter64 (const CounterId &counter, __int64 value)
 Sets the specified counter to the supplied value.
LONG IncrementPerformanceCounter32 (const CounterId &counter)
 Increments the specified 32-bit counter and returns the incremented value.
LONG DecrementPerformanceCounter32 (const CounterId &counter)
 Decrements the specified 32-bit counter and returns the decremented value.
__int64 IncrementPerformanceCounter64 (const CounterId &counter)
 Increments the specified 64-bit counter and returns the incremented value. Uses InterlockedIncrement64() to do this.
__int64 DecrementPerformanceCounter64 (const CounterId &counter)
 Decrements the specified 64-bit counter and returns the decremented value. Uses InterlockedIncrement64() to do this.
LONG AddToPerformanceCounter32 (const CounterId &counter, LONG value)
 Adds the supplied value to the specified 32-bit counter and returns the result.
LONG SubtractFromPerformanceCounter32 (const CounterId &counter, LONG value)
 Subtracts the supplied value from the specified 32-bit counter and returns the result.
__int64 AddToPerformanceCounter64 (const CounterId &counter, __int64 value)
 Adds the supplied value to the specified 64-bit counter and returns the result. Uses InterlockedIncrement64() to do this.
__int64 SubtractFromPerformanceCounter64 (const CounterId &counter, __int64 value)
 Subtracts the supplied value from the specified 32-bit counter and returns the result. Uses InterlockedIncrement64() to do this.

Static Public Member Functions

static bool CanCreateCounters (const JetByteTools::Win32::IKernelObjectName &name, SECURITY_ATTRIBUTES *pSecurityAttributes)

Static Public Attributes

static const ObjectId NoObject
 A performance object id.
static const CounterId NoCounter
 A performance counter id.

Protected Member Functions

void Initialise (IPerformanceDataBlock &dataBlock, const CPerformanceDataSchema &schema)


Member Typedef Documentation

typedef LONG InstanceId [inherited]

An instance id.


Constructor & Destructor Documentation

CSharedMemoryMutexPerformanceMonitorCounters ( const JetByteTools::Win32::IKernelObjectName name,
const CPerformanceDataSchema schema,
DWORD  firstCounterIndex,
SECURITY_ATTRIBUTES pSecurityAttributes = nullptr 
)


Member Function Documentation

bool CanCreateCounters ( const JetByteTools::Win32::IKernelObjectName name,
SECURITY_ATTRIBUTES pSecurityAttributes 
) [static, inherited]

ILockableObject & GetLock (  )  [inherited]

IPerformanceDataBlock & GetDataBlock (  )  [inherited]

ObjectId GetPerformanceObject ( const JetByteTools::Core::_tstring objectName  )  const [inherited]

Returns the object id of the specified performance object. Note that the object must have been defined in the schema used to construct this object. The name is the object's name in the schema's default language.

DWORD GetMaxInstanceNameLength ( const JetByteTools::Core::_tstring objectName  )  const [inherited]

Returns the maximum allowable instance name length for an object of the specified name. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.

DWORD GetNumberOfInstancesAllocated ( const JetByteTools::Core::_tstring objectName  )  const [inherited]

Returns the number of instances currently allocated of objects of the specified name.

ObjectId AllocatePerformanceObjectInstance ( const JetByteTools::Core::_tstring objectName,
const JetByteTools::Core::_tstring instanceName,
bool  alwaysResetCounters = false 
) [inherited]

Returns the object id of the specific instance of the specific performance object. If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.

ObjectId AllocatePerformanceObjectInstance ( const JetByteTools::Core::_tstring objectName,
const InstanceId instanceId,
bool  alwaysResetCounters = false 
) [inherited]

Returns the object id of the specific instance of the specific performance object. If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by instance id in the schema used to construct this object. The name is the object's name in the schema's default language.

ObjectId AllocateChildPerformanceObjectInstance ( const JetByteTools::Core::_tstring objectName,
const JetByteTools::Core::_tstring instanceName,
const ObjectId &  parentObjectId,
bool  alwaysResetCounters = false 
) [inherited]

Returns the object id of the specific instance of the specific performance object with the specific parent. If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.

void ResetPerformanceObjectInstance ( const ObjectId &  objectId  )  [inherited]

Returns the object id of the specific instance of the specific performance object with the specific parent. Looks at the parent's object name and extracts the instance, if any, and creates the child object instance in the same object instance as the parent... If the instance already exists then the counters for this instance are reset to zero. Note that the object must have been defined as an object with instances allocated by name in the schema used to construct this object. The name is the object's name in the schema's default language.

Resets a performance object. All counters are set to zero.

void ReleasePerformanceObjectInstance ( const ObjectId &  objectId  )  [inherited]

Releases a performance object. If this is an object with instances then the instance is now available for reuse.

CounterId GetPerformanceCounter ( const ObjectId &  objectId,
const JetByteTools::Core::_tstring counterName 
) const [inherited]

Returns the counter id of the specific counter. Note that the counter must have been defined in the schema used to construct this object. The name is the counter's name in the schema's default language.

bool GetInstanceNamesForObject ( const JetByteTools::Core::_tstring objectName,
JetByteTools::Core::StringVector instanceNames 
) const [inherited]

LONG & AccessPerformanceCounter32 ( const CounterId &  counter  )  [inherited]

Returns a writable 32-bit value for the specific counter id.

void SetPerformanceCounter32 ( const CounterId &  counter,
LONG  value 
) [inherited]

Sets the specified counter to the supplied value.

__int64 & AccessPerformanceCounter64 ( const CounterId &  counter  )  [inherited]

Returns a writable 64-bit value for the specific counter id.

void SetPerformanceCounter64 ( const CounterId &  counter,
__int64  value 
) [inherited]

Sets the specified counter to the supplied value.

LONG IncrementPerformanceCounter32 ( const CounterId &  counter  )  [inherited]

Increments the specified 32-bit counter and returns the incremented value.

LONG DecrementPerformanceCounter32 ( const CounterId &  counter  )  [inherited]

Decrements the specified 32-bit counter and returns the decremented value.

__int64 IncrementPerformanceCounter64 ( const CounterId &  counter  )  [inherited]

Increments the specified 64-bit counter and returns the incremented value. Uses InterlockedIncrement64() to do this.

__int64 DecrementPerformanceCounter64 ( const CounterId &  counter  )  [inherited]

Decrements the specified 64-bit counter and returns the decremented value. Uses InterlockedIncrement64() to do this.

LONG AddToPerformanceCounter32 ( const CounterId &  counter,
LONG  value 
) [inherited]

Adds the supplied value to the specified 32-bit counter and returns the result.

LONG SubtractFromPerformanceCounter32 ( const CounterId &  counter,
LONG  value 
) [inherited]

Subtracts the supplied value from the specified 32-bit counter and returns the result.

__int64 AddToPerformanceCounter64 ( const CounterId &  counter,
__int64  value 
) [inherited]

Adds the supplied value to the specified 64-bit counter and returns the result. Uses InterlockedIncrement64() to do this.

__int64 SubtractFromPerformanceCounter64 ( const CounterId &  counter,
__int64  value 
) [inherited]

Subtracts the supplied value from the specified 32-bit counter and returns the result. Uses InterlockedIncrement64() to do this.

void Initialise ( IPerformanceDataBlock dataBlock,
const CPerformanceDataSchema schema 
) [protected, inherited]


Member Data Documentation

const CPerformanceMonitorCountersBase::ObjectId NoObject [static, inherited]

A performance object id.

const CPerformanceMonitorCountersBase::CounterId NoCounter [static, inherited]

A performance counter id.


Generated on Sun Sep 12 19:09:53 2021 for The Server Framework - v7.4 by doxygen 1.5.3