The following options let you launch a program (with various start-up modes), inject into a running program or wait for a program to start before attaching.
Specifies the full file system path of the executable target program to be started by Performance Validator, including any extension.
Not compatible with -injectName, -injectID, -waitName or -monitorAService.
See -arg below to pass arguments to your program, and -directory to set where it runs.
Examples:
-program c:\testbed.exe
-program "c:\new compiler\version2\testbed.exe"
If you specify the file without a path then:
•If you used -directory to set a startup directory then the filename in that directory is used if it exists
•Otherwise, the directories in the PATH environment variable are used to look for the filename
-programToMonitor
-programToMonitor has been replaced by -programToMonitorEXE. -programToMonitor will be honoured to provided backward compatibility.
Specifies the full path of the program from which the data is collected, but does not change which process is initially launched. Include the extension.
This program will be monitored by Performance Validator only when the program specified using -program starts it.
If no path is specified, the first child process that has the same name will be monitored.
To monitor any program that is launched specify <<Any>> as the program argument. In batch files and powershell scripts you will need to quote this to get it accepted by the file parser.
See -programToMonitorLaunchCount to change which instance of the program is monitored.
Only valid in conjunction with -program.
Examples:
-programToMonitorEXE c:\testbed-child-process.exe
-programToMonitorEXE "c:\new compiler\version2\testbedChildProcess.exe"
-programToMonitorEXE testbed-child-process.exe
-programToMonitorEXE "<<Any>>"
-program c:\testbed.exe -programToMonitorEXE c:\testbed-child-process.exe
In this last example c:\testbed.exe is launched but not monitored. Only when testbed.exe launches a child process c:\testbed-child-process.exe is that child process monitored.
This option provides a qualifying DLL to identify different .Net Core processes, which are typically launched using the same .Net Core runtime. Include the dll extension.
Only valid in conjunction with -program and -programToMonitorEXE.
Examples:
-programToMonitorDLL c:\test\dotNetCoreApp.dll
-program c:\testbed.exe -programToMonitorEXE "c:\program files\dotnet\dotnet.exe" -programToMonitorDLL c:\test\dotNetCoreApp.dll
In this last example c:\testbed.exe is launched but not monitored. Only when testbed.exe launches a child process c:\program files\dotnet\dotnet.exe to run the application c:\test\dotNetCoreApp.dll is that child process monitored.
Specify the nth invocation of the program specified by -programToMonitor which is to have its data collected.
Any value which is invalid (including anything less than 1) will default to 1.
Only valid in conjunction with -programToMonitor and consequently also -program.
Examples:
-programToMonitorLaunchCount 1
-programToMonitorLaunchCount 34
-program c:\testbed.exe -programToMonitor c:\testbed-child-process.exe -programToMonitorLaunchCount 1
In the above example c:\testbed.exe is launched but not monitored. As soon as testbed.exe launches a child process c:\testbed-child-process.exe then that child process monitored.
If the value 1 was changed to a 2, then only the second invocation of c:\testbed-child-process.exe would get monitored, with the first invocation being ignored.
Passes the following element on the command line to the target program.
-arg can be used multiple times, or you can use -allArgs
To pass quotes along with the string, escape a pair of inner quotes like the example below
Only valid with: -program
Examples:
-arg myProgram.exe
-arg "c:\Program Files\myApp\myProgram.exe"
-arg "-in infile -out outfile"
-arg "\"a quoted string\""
Passes the remainder of the command line (after -allArgs) to the program being launched.
Unlike -arg above, there is no need to escape the quotes as the content is passed verbatim.
Only valid with: -program
Example:
-allArgs anything put here is passed to the target program "even stuff in quotes" is passed
Sets the working directory in which the program is executed. If -directory is not specified the program is run in its current directory.
Only valid with: -program
Examples:
-directory c:\development\
-directory "c:\research and development\"
Environment variables for program, as a series of name/value pairs. Not to be confused with -setenvironment.
Use this option once for each environment variable you wish to set.
To pass quotes along with the string, escape a pair of inner quotes like the example below
Only valid with: -program
Examples:
-environment APP_FLAG=ON;
-environment "APP_FAG=ON;"
-environment "APP_COMMS=ON; APP_DEBUG=OFF;"
-environment "APP_MSG=\"A quoted string with spaces\";"
Specifies the type of data collection that you want. Native, .Net or mixed mode (both native and .Net).
Valid with -program and -monitorAService.
Examples:
-dataCollectType native
-dataCollectType dotNet
-dataCollectType mixedMode
Specifies a file to be read and piped to the standard input of the application being tested.
If the filename contains spaces, the filename should be quoted.
An error occurs if the file does not exist. See -ignoreMissingStdin to avoid this error.
Examples:
-stdin c:\settings\input.txt
-stdin "c:\reg tests settings\input.txt"
Specifies a file to be written with data piped from the standard output of the application being tested.
If the filename contains spaces, the filename should be quoted.
An error occurs if the file does not exist. See -ignoreMissingStdout to avoid this error.
Examples:
-stdout c:\settings\output.txt
-stdout "c:\reg tests results\output.txt"
If this flag is specified and the file specified by -stdin does not exist, no error is reported.
If this flag is specified and the file specified by -stdout does not exist, no error is reported.
All these options are obsolete and will be ignored if present on command lines or in command files.
Sets the name of the process for Performance Validator to attach to.
Not compatible with -program, -injectID, -waitName or -monitorAService.
Examples:
-injectName c:\testbed.exe
-injectName "c:\new compiler\version2\testbed.exe"
Sets the numeric (decimal) id of a process for Performance Validator to attach to.
Not compatible with -program, -injectName, -waitName or -monitorAService.
Example:
-injectID 1032
-waitName
-waitName has been replaced by -waitNameEXE. -waitName will be honoured to provided backwards compatibility.
Sets the name of a process that Performance Validator will wait for.
When the named process starts Performance Validator will attach to the process.
Not compatible with -program, -injectName, -injectID or -monitorAService.
Examples:
-waitNameEXE c:\testbed.exe
-waitNameEXE "c:\new compiler\version2\testbed.exe"
Sets the name of a process DLL that Performance Validator will wait for.
When the named process starts Performance Validator will attach to the process.
Examples:
-waitNameDLL c:\dotNetApp.dll
-waitNameDLL "c:\new compiler\version2\dotNetApp.dll"
For use with -waitNameEXE when you want to wait for .Net Core applications.
-waitNameEXE "c:\program files\dotnet\dotnet.exe" -waitNameDLL "c:\testApps\dotNetCoreApp\release\dotNetCoreApp.dll"
Sets the full file system path of a service including any extension.
Performance Validator will wait for the service to start and attach to it.
Not compatible with -program, -injectName, -injectID or -waitName.
Examples:
-monitorAService c:\service.exe
-monitorAService "c:\new compiler\version2\service.exe"
Specifies and argument to pass to the .Net Core runtime. You can specify -dotNetCoreArg as many times as you need to pass as many arguments as you need.
See this Microsoft document for the list of .Net Core runtime configuration options https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet#runtime-options.
Use this argument with -program.
Examples:
-dotNetCoreArg "--roll-forward LatestPatch"
-dotNetCoreArg "--runtimeconfig ./configUnitTest.json"
Specifies the type of program being launched by the .Net Core runtime. You can specify -dotNetCoreLaunchType once. If specified more than once, the last definition is used.
Use this argument with -program.
Examples:
-dotNetCoreLaunchType SelfContained
-dotNetCoreLaunchType FrameworkDependent
Enables or disables the collection of flow tracing data
Examples:
-collectData:On
-collectData:Off
Enables or disables the collection of timing information for functions
Examples:
-collectFunctionTimes:On
-collectFunctionTimes:Off
Enables or disables the collection of timing information for lines
Examples:
-collectLineTimes:On
-collectLineTimes:Off
Enables or disables the collection of standard output (stdout)
Examples:
-collectStdout:On
-collectStdout:Off