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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + (double)((x).LowPart))
32 typedef struct _PERFDATA
34 WCHAR ImageName
[MAX_PATH
];
36 WCHAR UserName
[MAX_PATH
];
39 LARGE_INTEGER CPUTime
;
40 ULONG WorkingSetSizeBytes
;
41 ULONG PeakWorkingSetSizeBytes
;
42 ULONG WorkingSetSizeDelta
;
44 ULONG PageFaultCountDelta
;
45 ULONG VirtualMemorySizeBytes
;
46 ULONG PagedPoolUsagePages
;
47 ULONG NonPagedPoolUsagePages
;
51 ULONG USERObjectCount
;
53 IO_COUNTERS IOCounters
;
55 LARGE_INTEGER UserTime
;
56 LARGE_INTEGER KernelTime
;
57 } PERFDATA
, *PPERFDATA
;
59 BOOL
PerfDataInitialize(void);
60 void PerfDataUninitialize(void);
61 void PerfDataRefresh(void);
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);
109 #endif /* __PERFDATA_H */