A harness that records the time and sequence, and simple memory usage of your program, at entries and exits of functions in the target program.
See Benchmark::Harness, "Parameters", for instruction on how to configure a test harness, and use 'Trace' as your harness name.
The report is an XML file with schema you can find in xsd/Trace.xsd, or at http://schemas.benchmark-harness.org/Trace.xsd
For example:
<Trace see-Benchmark::Harness-for-attributes-here> <T _i="0" _m="E" u="0.234375" m="0" s="0.109375" t="1"/> <T _i="2" _m="E" u="0.234375" m="0" s="0.109375" t="1"/> <T _i="2" _m="X" u="0.234375" m="0" s="0.109375" t="1"/> <T _i="0" _m="X" u="0.234375" m="0" s="0.109375" t="1"/> </Trace>
The @_i attribute is described in Benchmark::Harness. It identifies the name of the function being traced.
@_m will be 'E' or 'X', for entry or exit from the function.
@u is the user memory use at that moment, in megabytes.
@m is virtual memory size, in megabytes.
@s is kernal memory size, in megabytes.
@t is time since the Harness started, in seconds.
Approximately 0.7 millisecond per trace.
These process parameters are also available via this code, but are not transferred to the harness report.
'Caption', 'CommandLine', 'CreationClassName', 'CreationDate', 'CSCreationClassName', 'CSName', 'Description', 'ExecutablePath', 'ExecutionState', 'Handle', 'HandleCount', 'InstallDate', 'KernelModeTime' => @s 'MaximumWorkingSetSize', 'MinimumWorkingSetSize', 'Name', 'OSCreationClassName', 'OSName', 'OtherOperationCount', 'OtherTransferCount', 'PageFaults', 'PageFileUsage', 'ParentProcessId', 'PeakPageFileUsage', 'PeakVirtualSize', 'PeakWorkingSetSize', 'Priority', 'PrivatePageCount', 'ProcessId', 'QuotaNonPagedPoolUsage', 'QuotaPagedPoolUsage', 'QuotaPeakNonPagedPoolUsage', 'QuotaPeakPagedPoolUsage', 'ReadOperationCount', 'ReadTransferCount', 'SessionId', 'Status', 'TerminationDate', 'ThreadCount', 'UserModeTime' => @u 'VirtualSize', 'WindowsVersion', 'WorkingSetSize' => @m 'WriteOperationCount', 'WriteTransferCount'
Benchmark::Harness
Glenn Wood, <glennwood@cpan.org>
Copyright (C) 2004 Glenn Wood. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
4 POD Errors
The following errors were encountered while parsing the POD:
Unknown directive: =item1
To install Benchmark::Harness, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Benchmark::Harness
CPAN shell
perl -MCPAN -e shell install Benchmark::Harness
For more information on module installation, please visit the detailed CPAN module installation guide.