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

CPerformanceDataCollector Class Reference

Inheritance diagram for CPerformanceDataCollector:
Collaboration diagram for CPerformanceDataCollector:

List of all members.


Detailed Description

An object which implements ICollectPerformanceData and represents an installed set of performance counters in memory in a perfmon performance extension dll that wishes to monitor those counters. This object is created from a CPerformanceDataSchema and provides methods for an dll which conforms to the requirements for a performance data collection dll to integrate with perfmon.


Public Types

typedef
JetByteTools::Core::TExpandableBuffer
< BYTE
ByteBuffer

Public Member Functions

 CPerformanceDataCollector (IPerformanceDataBlockFactory &dataBlockFactory, const CPerformanceDataSchema &schema, DWORD firstCounterIndex)
 Creates a set of performance counters within a dll that monitors them using the supplied name for the shared data that is used to allow communication between the application and the data collection dll. The counters are defined by the supplied schema and are installed in the registry with the indicated firstCounterIndex which can be obtained by calling IInstallPerformanceMonitorCounters::FirstCounterIndex(). The interprocess communication objects are secured using the supplied security attributes. Note that since the interprocess communication required uses shared memory the caller must have the SE_CREATE_GLOBAL_NAME privilege to run this code.
 CPerformanceDataCollector (const CPerformanceDataCollector &rhs)
 ~CPerformanceDataCollector () override
CPerformanceDataCollectoroperator= (const CPerformanceDataCollector &rhs)
const TCHARGetPerfStringsIndex (DWORD &numberOfStrings) const
void Collect (const JetByteTools::Core::_tstring &valueName, ByteBuffer &buffer)
void Collect (ByteBuffer &buffer)
void Open (const wchar_t *pDevNames) override
 Opens the data and prepares it for collection. This will be called once and before Collect() is ever called.
void Close () override
 Closes the data and cleans up and resources. This will be called once after all calls to Collect() that will be made have been completed.
bool CollectW (const wchar_t *pszValueName, BYTE **ppData, DWORD *pcbTotalBytes, DWORD *pNumObjectTypes) override
 Collects data. See here for more details on how to interpret the parameters to this function.
bool Collect (const JetByteTools::Core::_tstring &valueName, BYTE **ppData, DWORD *pcbTotalBytes, DWORD *pNumObjectTypes)


Member Typedef Documentation


Constructor & Destructor Documentation

CPerformanceDataCollector ( IPerformanceDataBlockFactory dataBlockFactory,
const CPerformanceDataSchema schema,
DWORD  firstCounterIndex 
)

Creates a set of performance counters within a dll that monitors them using the supplied name for the shared data that is used to allow communication between the application and the data collection dll. The counters are defined by the supplied schema and are installed in the registry with the indicated firstCounterIndex which can be obtained by calling IInstallPerformanceMonitorCounters::FirstCounterIndex(). The interprocess communication objects are secured using the supplied security attributes. Note that since the interprocess communication required uses shared memory the caller must have the SE_CREATE_GLOBAL_NAME privilege to run this code.

~CPerformanceDataCollector (  )  [override]


Member Function Documentation

CPerformanceDataCollector& operator= ( const CPerformanceDataCollector rhs  ) 

const TCHAR * GetPerfStringsIndex ( DWORD numberOfStrings  )  const

void Collect ( const JetByteTools::Core::_tstring valueName,
ByteBuffer buffer 
)

void Collect ( ByteBuffer buffer  ) 

void Open ( const wchar_t *  pDevNames  )  [override, virtual]

Opens the data and prepares it for collection. This will be called once and before Collect() is ever called.

Implements ICollectPerformanceData.

void Close (  )  [override, virtual]

Closes the data and cleans up and resources. This will be called once after all calls to Collect() that will be made have been completed.

Implements ICollectPerformanceData.

bool CollectW ( const wchar_t *  pszValueName,
BYTE **  ppData,
DWORD pcbTotalBytes,
DWORD pNumObjectTypes 
) [override, virtual]

Collects data. See here for more details on how to interpret the parameters to this function.

Implements ICollectPerformanceData.

bool Collect ( const JetByteTools::Core::_tstring valueName,
BYTE **  ppData,
DWORD pcbTotalBytes,
DWORD pNumObjectTypes 
)


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