Global objects
There are three global objects available to the load script that provide information that can be used to determine how heavy loaded the engine is: Engine, System, and Process.
All have a Refresh method; however, this is not normally required because the counters are automatically refreshed before the load script is run.
Engine object
The Engine object represents information about the interviews that are running or have run on the engine. It also represents limits or values that have been configured in the registry for the engine.
Properties
CachedProjectCount
The number of projects cached on the engine.
As Long
CachedProjectWeight
The CachedProjectWeight set in the registry. Can be used to weight the PercentLoaded value if the project is cached.
As Long
CompletesPerSec
The number of interviews that completed during the last second.
As Long
CompletesPerSecLimit
The limit of CompletesPerSec for the engine as specified in the registry. The default value is 100.
As Long
ConnectionLimit
The ConnectionLimit for the engine as specified in the registry. The default value is 1000.
As Long
CurrentInterviews
The current number of interviews running. Use the optional ProjectName parameter to get the count for a specific project, otherwise the total count is returned.
As Long
CurrentInterviewers
The current number of interviewers running. The optional ProjectName parameter can be used to get the count for a specific project, otherwise the total count is returned.
As Long
ErrorsPerSec
The number of errors that have occurred processing requests for interviews during the last second.
As Long
ErrorsPerSecLimit
The limit for ErrorPerSec for mrEngine as specified in the registry. The default value is 30.
As Long
MaxCompletesPerSec
The maximum number of interviews that completed during a second since the engine was started.
As Long
MaxErrorsPerSec
The maximum number of errors that have occured processing requests for interviews during a second since the engine started.
As Long
MaxNextsPerSec
The maximum number of requests for the next page of an interview during a second since the engine was started.
As Long
MaxRequestsPerSec
The maximum number of requests during a second since the engine was started.
As Long
MaxRestartsPerSec
The maximum number of interviews that were restarted during a second since the engine was started.
As Long
MaxStartsPerSec
The maximum number of start requests during a second since the engine was started.
As Long
MaxTimeoutsPerSec
The maximum number of interviews that timed out during a second since the engine was started.
As Long
NextsPerSec
The number of requests for the next page of an interview during the last second.
As Long
RequestsPerSec
The number of requests during the last second.
As Long
RequestsPerSecLimit
The limit of RequestsPerSec for mrEngine as specified in the registry. The default value is 250.
As Long
RestartsPerSec
The number of interviews that were restarted during the last second.
As Long
RestartsPerSecLimit
The limit of RestartsPerSec for mrEngine as specified in the registry. The default value is 50.
As Long
StartsPerSec
The number of requests to start an interview during the last second.
As Long
StartsPerSecLimit
The limit of StartsPerSec for mrEngine as specified in the registry. The default value is 100.
As Long
TimeoutsPerSec
The number of interviews that timed out during the last second.
As Long
TimeoutsPerSecLimit
The limit of TimeoutsPerSec for mrEngine as specified in the registry. The default value is 100.
As Long
TotalErrors
The number of errors that have occured processing requests for interviews.
As Long
TotalInterviews
The total number of interviews started since mrEngine was started.
As Long
TotalRestarts
The number of interviews that have been restarted since mrEngine was started.
As Long
TotalTimeouts
The number of interviews that timed out since the engine was started.
As Long
Methods
IsCachedProject(Name As String)
Returns True if the specified project is currently cached
As Boolean
Refresh()
Update the counters (not normally required)
System object
The System object represents memory information for the whole machine. Its values are based on the values returned by the GlobalMemoryStatusEx Win32 API function. For more information, see:
Properties
AvailablePhysical
Available (unused) physical RAM (kilobytes):
MEMORYSTATUSEX.ullAvailPhys / 1024
As Long
AvailableVirtual
Virtual memory address space available for the process (kilobytes):
MEMORYSTATUSEX.ullAvailVirtual /1024
As Long
MemoryLoad
The percentage of the physical memory in use. This is:
MEMORYSTATUSEX.MemoryLoad
As Long
PercentProcessorTime
Total percentage processor time across all CPUs for the system. This is the average value of last five raw values.
As Long
TotalPhysical
Physical RAM in system (kilobytes):
MEMORYSTATUSEX.ullTotalPhys /1024
As Long
TotalVirtual
As Long
The total virtual memory address space for the process (typically 2GB) (kilobytes):
MEMORYSTATUSEX.ullTotalVirtual / 1024
Methods
Refresh()
Calls GlobalMemoryStatusEx to update the counters.
Process object
The Process object represents memory information for the single engine process. Its values are based on the values returned by the GetProcessMemoryInfo Win32 API function. For more information, see:
Properties
MemoryUsage
Current memory (working-set) usage (kilobytes):
PROCESS_MEMORY_COUNTERS.WorkingSetSize /1024
As Long
PeakMemoryUsage
Peak memory (working-set) usage (kilobytes):
PROCESS_MEMORY_COUNTERS.PeakWorkingSetSize / 1024
As Long
PeakVirtualMemoryUsage
Peak virtual memory (swap file) usage (kilobytes):
PROCESS_MEMORY_COUNTERS.PeakPagefileUsage / 1024
As Long
PercentProcessorTime
Total percentage processor time across all CPUs for the current process. This is the average value of last five raw values.
As Long
VirtualMemoryUsage
Current virtual memory (swap file) usage (kilobytes):
PROCESS_MEMORY_COUNTERS.PagefileUsage /1024
As Long
Methods
Refresh()
Calls GetProcessMemoryInfo again to update the counters.
See also