QTP provides the object called "SystemMonitor" which can be used to get Memory and Processor usage.
'To find the Memory usage of an application, use below:
SystemMonitor.GetValue("Application name without extension", "counter name")
Ex: msgbox SystemMonitor.GetValue("QTPro","Memory Usage (in MB)")
'To find the Processor usage of an application, use below:
Ex: msgbox SystemMonitor.GetValue("javaw","% Processor Time")
No comments:
Post a Comment