You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.3 KiB
37 lines
1.3 KiB
/*==========================================================================*\
|
|
|
|
Module: perf.h
|
|
|
|
Copyright Microsoft Corporation 1998, All Rights Reserved.
|
|
|
|
Author: WayneC, MinYang
|
|
|
|
Descriptions: Interface functions accessing perf object instances.
|
|
|
|
Modified: Awetmore - for NTFSDRV usage
|
|
|
|
\*==========================================================================*/
|
|
|
|
|
|
#ifndef __PERF_H__
|
|
#define __PERF_H__
|
|
|
|
#include "snprflib.h"
|
|
#include "ntfsdrct.h"
|
|
|
|
#define DEFAULT_PERF_UPDATE_INTERVAL 1000 // milliseconds
|
|
|
|
#define IncCtr(ppoi,x) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) InterlockedIncrement((PLONG)pDword); }}
|
|
#define DecCtr(ppoi,x) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) InterlockedDecrement((PLONG)pDword); }}
|
|
#define AddCtr(ppoi,x,y) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) InterlockedExchangeAdd((PLONG)pDword, (LONG)y); }}
|
|
#define SetCtr(ppoi,x,y) { LPDWORD pDword; if (ppoi) { pDword = ppoi->GetDwordCounter(x); if (pDword) (*pDword)=y; } }
|
|
|
|
BOOL InitializePerformanceStatistics ();
|
|
void ShutdownPerformanceStatistics ();
|
|
|
|
PerfObjectInstance * CreatePerfObjInstance (LPCWSTR pwstrInstanceName);
|
|
|
|
extern BOOL g_fPerfCounters;
|
|
|
|
#endif // __PERF_H__
|
|
|