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 BOOL
PerfDataInitialize(void);
70 void PerfDataRefresh(void);
72 ULONG
PerfDataGetProcessCount(void);
73 ULONG
PerfDataGetProcessorUsage(void);
74 ULONG
PerfDataGetProcessorSystemUsage(void);
76 BOOL
PerfDataGetImageName(ULONG Index
, LPWSTR lpImageName
, int nMaxCount
);
77 ULONG
PerfDataGetProcessId(ULONG Index
);
78 BOOL
PerfDataGetUserName(ULONG Index
, LPWSTR lpUserName
, int nMaxCount
);
79 ULONG
PerfDataGetSessionId(ULONG Index
);
80 ULONG
PerfDataGetCPUUsage(ULONG Index
);
81 TIME
PerfDataGetCPUTime(ULONG Index
);
82 ULONG
PerfDataGetWorkingSetSizeBytes(ULONG Index
);
83 ULONG
PerfDataGetPeakWorkingSetSizeBytes(ULONG Index
);
84 ULONG
PerfDataGetWorkingSetSizeDelta(ULONG Index
);
85 ULONG
PerfDataGetPageFaultCount(ULONG Index
);
86 ULONG
PerfDataGetPageFaultCountDelta(ULONG Index
);
87 ULONG
PerfDataGetVirtualMemorySizeBytes(ULONG Index
);
88 ULONG
PerfDataGetPagedPoolUsagePages(ULONG Index
);
89 ULONG
PerfDataGetNonPagedPoolUsagePages(ULONG Index
);
90 ULONG
PerfDataGetBasePriority(ULONG Index
);
91 ULONG
PerfDataGetHandleCount(ULONG Index
);
92 ULONG
PerfDataGetThreadCount(ULONG Index
);
93 ULONG
PerfDataGetUSERObjectCount(ULONG Index
);
94 ULONG
PerfDataGetGDIObjectCount(ULONG Index
);
95 BOOL
PerfDataGetIOCounters(ULONG Index
, PIO_COUNTERS pIoCounters
);
97 ULONG
PerfDataGetCommitChargeTotalK(void);
98 ULONG
PerfDataGetCommitChargeLimitK(void);
99 ULONG
PerfDataGetCommitChargePeakK(void);
101 ULONG
PerfDataGetKernelMemoryTotalK(void);
102 ULONG
PerfDataGetKernelMemoryPagedK(void);
103 ULONG
PerfDataGetKernelMemoryNonPagedK(void);
105 ULONG
PerfDataGetPhysicalMemoryTotalK(void);
106 ULONG
PerfDataGetPhysicalMemoryAvailableK(void);
107 ULONG
PerfDataGetPhysicalMemorySystemCacheK(void);
109 ULONG
PerfDataGetSystemHandleCount(void);
111 ULONG
PerfDataGetTotalThreadCount(void);
113 #endif /* __PERFDATA_H */