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 Street, Fifth Floor, Boston, MA 02110-1301 USA
29 #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))
31 typedef struct _PERFDATA
33 WCHAR ImageName
[MAX_PATH
];
35 WCHAR UserName
[MAX_PATH
];
38 LARGE_INTEGER CPUTime
;
39 ULONG WorkingSetSizeBytes
;
40 ULONG PeakWorkingSetSizeBytes
;
41 ULONG WorkingSetSizeDelta
;
43 ULONG PageFaultCountDelta
;
44 ULONG VirtualMemorySizeBytes
;
45 ULONG PagedPoolUsagePages
;
46 ULONG NonPagedPoolUsagePages
;
50 ULONG USERObjectCount
;
52 IO_COUNTERS IOCounters
;
54 LARGE_INTEGER UserTime
;
55 LARGE_INTEGER KernelTime
;
56 } PERFDATA
, *PPERFDATA
;
58 BOOL
PerfDataInitialize(void);
59 void PerfDataUninitialize(void);
60 void PerfDataRefresh(void);
62 BOOL
PerfDataGet(ULONG Index
, PPERFDATA
*lppData
);
63 ULONG
PerfDataGetProcessCount(void);
64 ULONG
PerfDataGetProcessorUsage(void);
65 ULONG
PerfDataGetProcessorSystemUsage(void);
67 BOOL
PerfDataGetImageName(ULONG Index
, LPTSTR lpImageName
, int nMaxCount
);
68 ULONG
PerfDataGetProcessId(ULONG Index
);
69 BOOL
PerfDataGetUserName(ULONG Index
, LPTSTR lpUserName
, int nMaxCount
);
70 ULONG
PerfDataGetSessionId(ULONG Index
);
71 ULONG
PerfDataGetCPUUsage(ULONG Index
);
72 LARGE_INTEGER
PerfDataGetCPUTime(ULONG Index
);
73 ULONG
PerfDataGetWorkingSetSizeBytes(ULONG Index
);
74 ULONG
PerfDataGetPeakWorkingSetSizeBytes(ULONG Index
);
75 ULONG
PerfDataGetWorkingSetSizeDelta(ULONG Index
);
76 ULONG
PerfDataGetPageFaultCount(ULONG Index
);
77 ULONG
PerfDataGetPageFaultCountDelta(ULONG Index
);
78 ULONG
PerfDataGetVirtualMemorySizeBytes(ULONG Index
);
79 ULONG
PerfDataGetPagedPoolUsagePages(ULONG Index
);
80 ULONG
PerfDataGetNonPagedPoolUsagePages(ULONG Index
);
81 ULONG
PerfDataGetBasePriority(ULONG Index
);
82 ULONG
PerfDataGetHandleCount(ULONG Index
);
83 ULONG
PerfDataGetThreadCount(ULONG Index
);
84 ULONG
PerfDataGetUSERObjectCount(ULONG Index
);
85 ULONG
PerfDataGetGDIObjectCount(ULONG Index
);
86 BOOL
PerfDataGetIOCounters(ULONG Index
, PIO_COUNTERS pIoCounters
);
88 ULONG
PerfDataGetCommitChargeTotalK(void);
89 ULONG
PerfDataGetCommitChargeLimitK(void);
90 ULONG
PerfDataGetCommitChargePeakK(void);
92 ULONG
PerfDataGetKernelMemoryTotalK(void);
93 ULONG
PerfDataGetKernelMemoryPagedK(void);
94 ULONG
PerfDataGetKernelMemoryNonPagedK(void);
96 ULONG
PerfDataGetPhysicalMemoryTotalK(void);
97 ULONG
PerfDataGetPhysicalMemoryAvailableK(void);
98 ULONG
PerfDataGetPhysicalMemorySystemCacheK(void);
100 ULONG
PerfDataGetSystemHandleCount(void);
102 ULONG
PerfDataGetTotalThreadCount(void);