6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 typedef ULARGE_INTEGER TIME
;
30 typedef struct _PERFDATA
32 WCHAR ImageName
[MAX_PATH
];
34 WCHAR UserName
[MAX_PATH
];
41 ULONG USERObjectCount
;
43 SIZE_T WorkingSetSizeDelta
;
44 ULONG PageFaultCountDelta
;
45 VM_COUNTERS vmCounters
;
46 IO_COUNTERS IOCounters
;
51 } PERFDATA
, *PPERFDATA
;
53 /* SystemPageFileInformation (18) */
55 struct _SYSTEM_PAGEFILE_INFORMATION
58 ULONG CurrentSizePages
;
61 UNICODE_STRING PagefileFileName
;
62 } SYSTEM_PAGEFILE_INFORMATION
, *PSYSTEM_PAGEFILE_INFORMATION
;
64 #define Li2Double(x) ((double)((x).QuadPart))
66 #define GR_GDIOBJECTS 0 /* Count of GDI objects */
67 #define GR_USEROBJECTS 1 /* Count of USER objects */
69 typedef LONG (WINAPI
*PROCNTQSI
)(UINT
,PVOID
,ULONG
,PULONG
);
70 typedef DWORD (WINAPI
*PROCGGR
)(HANDLE
,DWORD
);
71 typedef BOOL (WINAPI
*PROCGPIC
)(HANDLE
,PIO_COUNTERS
);
72 typedef BOOL (WINAPI
*PROCISW64
)(HANDLE
,PBOOL
);
74 BOOL
PerfDataInitialize(void);
75 void PerfDataRefresh(void);
77 ULONG
PerfDataGetProcessCount(void);
78 ULONG
PerfDataGetProcessorUsage(void);
79 ULONG
PerfDataGetProcessorSystemUsage(void);
81 BOOL
PerfDataGetImageName(ULONG Index
, LPWSTR lpImageName
, int nMaxCount
);
82 ULONG
PerfDataGetProcessId(ULONG Index
);
83 BOOL
PerfDataGetUserName(ULONG Index
, LPWSTR lpUserName
, int nMaxCount
);
84 ULONG
PerfDataGetSessionId(ULONG Index
);
85 ULONG
PerfDataGetCPUUsage(ULONG Index
);
86 TIME
PerfDataGetCPUTime(ULONG Index
);
87 ULONG
PerfDataGetWorkingSetSizeBytes(ULONG Index
);
88 ULONG
PerfDataGetPeakWorkingSetSizeBytes(ULONG Index
);
89 ULONG
PerfDataGetWorkingSetSizeDelta(ULONG Index
);
90 ULONG
PerfDataGetPageFaultCount(ULONG Index
);
91 ULONG
PerfDataGetPageFaultCountDelta(ULONG Index
);
92 ULONG
PerfDataGetVirtualMemorySizeBytes(ULONG Index
);
93 ULONG
PerfDataGetPagedPoolUsagePages(ULONG Index
);
94 ULONG
PerfDataGetNonPagedPoolUsagePages(ULONG Index
);
95 ULONG
PerfDataGetBasePriority(ULONG Index
);
96 ULONG
PerfDataGetHandleCount(ULONG Index
);
97 ULONG
PerfDataGetThreadCount(ULONG Index
);
98 ULONG
PerfDataGetUSERObjectCount(ULONG Index
);
99 ULONG
PerfDataGetGDIObjectCount(ULONG Index
);
100 BOOL
PerfDataGetIOCounters(ULONG Index
, PIO_COUNTERS pIoCounters
);
102 ULONG
PerfDataGetCommitChargeTotalK(void);
103 ULONG
PerfDataGetCommitChargeLimitK(void);
104 ULONG
PerfDataGetCommitChargePeakK(void);
106 ULONG
PerfDataGetKernelMemoryTotalK(void);
107 ULONG
PerfDataGetKernelMemoryPagedK(void);
108 ULONG
PerfDataGetKernelMemoryNonPagedK(void);
110 ULONG
PerfDataGetPhysicalMemoryTotalK(void);
111 ULONG
PerfDataGetPhysicalMemoryAvailableK(void);
112 ULONG
PerfDataGetPhysicalMemorySystemCacheK(void);
114 ULONG
PerfDataGetSystemHandleCount(void);
116 ULONG
PerfDataGetTotalThreadCount(void);
118 #endif /* __PERFDATA_H */