AVSMeter

AVSMeter is a CLI (command line interface) tool which measures the speed/efficiency of Avisynth scripts and checks if Avisynth and its plugin sub-system are set up and working correctly.
Features:

- "Running" scripts with virtually no overhead, displaying clip info, CPU/GPU usage / memory usage and the minimum, maximum and average frames processed per second. Measuring how fast Avisynth can serve frames to a client application (x264, VirtualDub) and establishing CPU/GPU/memory usage helps with optimizing scripts and tracking down crashes, slowdowns and bottlenecks.
- Performing a thorough test of the Avisynth installation and associated plugins, checking if external dependencies are installed, etc.

Usage: AVSMeter script.avs [switches]
Switches
-avsinfo Display extended Avisynth info
-info [-i] Display clip info
-log [-l] Create log fil e
-csv Create csv file
-gpu Display GPU/VPU usage (requires GPU-Z)
-range=first,last Set frame range
-timelimit=n Set time limit (seconds)
-priority=n Set process priority (1:low, 2:normal, 3:high)
"-avsinfo"
Displays extended info about the installed Avisynth version and the plugin sub-system. If a custom avisynth.dll is specified in the ini file, info about that file will be displayed. The "-avsinfo" switch can be combined with "-log" in order to write the info to a log file ("avsinfo.log") which is created in the current (working) directory unless the INI option "LogDirectory" points to another (valid) directory. The log file contains additional info about OS/hardware, a list of DLL dependencies for avisynth.dll and all auto-load plugins and a list of internal/external Avisynth functions.
"-log"
Creates a log file with various details about the installed Avisynth version, clip info, runtime results, a copy of the script and a performance data table with the measured details about each frame/frame interval. The log file is created in the same directory as the script unless the INI option "LogDirectory" points to another (valid) directory.
Note: The numbering of the frames in the performance data section is not zero-based, i.e. the first frame is 1, not 0.
"-csv"
Creates a CSV file containing the performance data formatted as comma-separated values for direct import in Excel or a similar spread sheet program (OpenOffice, LibreOffice). The CSV file is created in the same directory as the script unless the INI option "LogDirectory" points to another (valid) directory.
Note: The numbering of the frames in the .csv file is not zero-based, i.e. the first frame is 1, not 0.
"-gpu"
Enables display of the GPU/VPU usage which of course is only useful if a filter that uses the GPU is in the chain. AVSMeter uses GPU-Z to access the graphics card sensors through a shared memory space. GPU-Z has to be running (the window can be minimized to the system tray) before running AVSMeter.
"-range=first,last"
Specify the range of frames to be processed. For example, "-range=1500,1999" processes 500 frames starting at frame 1500. Without "-range" AVSMeter processes all frames of the script.
"-timelimit=n"
Specify a time limit (in seconds) after which the program stops reading frames and terminates.
INI file settings
AVSMeter checks if a settings file ("AVSMeter.ini") exists in the directory from where it is started. If not, it will be created with the default settings.
Note: If applicable, command line switches override INI settings.
Supported settings for the INI file (default values in red):
"DisplayFPS" (0 or 1)
If set to "1", frames/second is printed to the console.
"DisplayTPF" (0 or 1):
If set to "1", time/frame (in milliseconds) is printed to the console.
"PauseBeforeExit" (0 or 1):
If set to "1", pauses the program at the end and returns to the console prompt only after pressing "ESC".
"CreateLog" (0 or 1):
Creates a log file with various details about the installed Avisynth version, clip info, runtime
results, a copy of the script and a performance data table with the measured details about each
frame/frame interval. The log file is created in the same directory as the script unless the INI
option "LogDirectory" points to a valid directory.
Note: The numbering of the frames in the performance data section is not zero-based, i.e. the first
frame is 1, not 0.
"CreateCSV" (0 or 1):
Creates a CSV file containing the performance data formatted as comma-separated values for direct
import in Excel or a similar spread sheet program (OpenOffice, LibreOffice). The CSV file is created
in the same directory as the script unless the INI option "LogDirectory" points to a valid
directory.
Note: The numbering of the frames in the .csv file is not zero-based, i.e. the first frame is 1, not 0.
"MonitorGPULoad" (0 or 1):
If set to "1", enables display of the GPU/VPU usage which of course is only useful if a filter
that uses the GPU is in the chain. AVSMeter uses GPU-Z to access the graphics card sensors through a
shared memory interface. GPU-Z must be running in order to use this feature
"TimeLimit" (1 - 999999):
Specify a time limit (in seconds) after which the program stops reading frames and terminates.
Setting this to "-1" disables the feature.
"LogDirectory"
The user can specify a directory in which all log files are stored. This has to be a fully qualified
path, for example "LogDirectory=c:\LogFiles" (without the quotes). The default is an empty string
which means that all log files are stored in the script directory or, in case the "-avsinfo"
switch was used, the current (working) directory.
"AVSDLL"
The user can specify the avisynth.dll to be used. This has to be a fully qualified path, for example
"AVSDLL=d:\apps\avisynth\avisynth.dll" (without the quotes). The default is an empty string which
means that AVSMeter will attempt to load avisynth.dll through the standard Windows search hierarchy.
"DisplayEfficiencyIndex" (0 or 1):
If set to "1", the result of (FPS / CPU usage) is printed to the console. This ratio indicates the
efficiency of a script (higher = better) and is useful for comparing different versions of a script
or scripts that are supposed to do the same thing.
"LogFileDateTimeSuffix" (0 or 1):
If set to "1", adds a date/time suffix to all .log and .csv files.
"FrameRange" (first,last):
Specify the range of frames to be processed. "FrameRange=0,-1" processes all frames in the script.
"FrameRange=1500,1999" processes 500 frames starting at frame 1500.
"AllowOnlyOneInstance" (0 or 1):
If set to "1", only one instance of AVSMeter can be started.
"ProcessPriority" (1, 2 or 3):
Specify the process priority for AVSMeter and all attached processes (1: low, 2: normal, 3: high).
"InvokeDistributor" (0 or 1):
For users of SEt's Avisynth MT: If set to "1", adds the "Distributor" call internally if the
script uses one of the MT Modes 1~4.
"ConUseSTDOUT" (0 or 1):
If set to "1", directs all console output to stdout. The default setting "0" uses stderr except
the "command line usage" message which always goes through stdout.
"UseColor" (0 or 1):
If set to "0", coloring of the console output is disabled.