PerformanceMonitor Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The PerformanceMonitor class fetches data for processes that are running on the system.
public ref class PerformanceMonitor : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class PerformanceMonitor : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type PerformanceMonitor = class
inherit XppObjectBase
Public Class PerformanceMonitor
Inherits XppObjectBase
- Inheritance
- Attributes
Remarks
You can take a snapshot of the system at any time and traverse the counters for any process that is running on the system.
The following example prints the processId and workingset values for all the currently running processes.
static void pvPerformanceMonitorTest(args a)
{
int i, j;
PerformanceMonitorInstance instance;
PerformanceMonitorCounter counter1, counter2;
PerformanceMonitor pm = new PerformanceMonitor();
// Take a current snapshot of the system.
pm.takeSnapshot ();
// Traverse all the running processes.
for (i= 1; i <= pm.instanceCount(); i++)
{
instance = pm.instance(i);
counter1 = instance.getCounter("ID Process");
counter2 = instance.getCounter("Working Set");
print instance.name(), " ",
counter1.intData(), " ",
counter2.intData();
}
pause;
}
Constructors
PerformanceMonitor() | |
PerformanceMonitor(IntPtr) |
Fields
__k_PerformanceMonitorId | |
kernelClass | (Inherited from XppObjectBase) |