Benchmark::Harness

Benchmark::Harness is a Perl module used to test Perl applications.
Download

Benchmark::Harness Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Glenn Wood
  • Publisher web site:
  • http://search.cpan.org/~glennwood/

Benchmark::Harness Tags


Benchmark::Harness Description

Benchmark::Harness is a Perl module used to test Perl applications. Benchmark::Harness is a Perl module used to test Perl applications.SYNOPSISBenchmark::Harness will invoke subroutines at specific, parametizable points during the execution of your Perl program. These subroutines may be standard Benchmark::Harness tracing routines, or routines composed by you. The setup involves just a one line addition to your test or driver program, and is easily parameterized and turned on or off from the outside.To activate Benchmark::Harness on your program, add to your test or driver program the following: use Benchmark::Harness; Benchmark::Harness:new(userPsw, 'MyHarness(reportFilename, ...)', @parameters );userPsw is the required user authentication to make Benchmark::Harness work. After authentication, new() loads your specified sub-harness (e.g., 'Benchmark::Harness::MyHarness') and executes the initialize() method on it, giving it the parameters specified in parantheses here. reportFilename specifies how to report the results from your harness, and @parameter is a list of 'module::sub' strings, each of which specifies a point in your target program to be monitored.userPswThe first parameter must be the userid and password (in the form "userid:password"). There is no default for this, and until you make an adjustment in the Authenticate() subroutine of Benchmark::Harness, the Benchmark::Harness will not function.The base class will handle basic authentication in a standard manner for you, and you may override this functionality by coding your own Authenticate() subroutine in your sub-harness.'MyHarness'The second parameter causes your harness module to be loaded (you do not need to 'use' it to have it effective). See the documentation for Benchmark::Harness::Trace for how you would write your sub-harness.Each sub-harness will be handed an array consisting of the parameters given in this new() statement (as in the "(userPsw,...)" illustrated above).reportFilenameFilename specifies the disposition (or not) of the output report. Note that this is given to the sub-harness to handle as it pleases; the base class Benchmark::Harness will handle it in the following manner:The harness report is written to a temporary file. You can get the string contained in this file with the Benchmark::Harness::old() method. The temporary file is then deleted.This is a convenient way to turn the harness off. Since it can be done by parameterization from the outside, it is especially adaptable to external toggling of the harness. If '0' is specified, no action is performed by Benchmark::Harness or by your sub-harness.If not '1' or '0', then this parameter is interpreted as a filename into which the report is written. Benchmark::Harness::old() will now return this filename rather than the content of the file. The report file will not be deleted by Benchmark::Harness::old().WARNING!Connecting Benchmark::Harness to your Perl application can pose a serious security/privacy risk to your application and the host computer it is running on. Requirements: · Perl


Benchmark::Harness Related Software