Jifty::Plugin::Recorder::Command::Playback.3pm

Langue: en

Autres versions - même langue

Version: 2009-02-12 (ubuntu - 08/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Jifty::Script::Playback - Play back request logs

DESCRIPTION

Jifty::Plugin::Recorder lets you record a request log. Using this command you can play back request logs. This can be handy for performance tuning, debugging, and testing.

API

options

This command takes three options. Any arguments that are not options will be interpreted as files to play back. Files will be played back in the order they are given on the command line.
max
The maximum time to wait between requests. By default there is no maximum and requests will be made exactly as they are in the log.
quiet
Suppress TRACE, DEBUG, and INFO log levels.
dbiprof
Enable DBI profiling.

run

Run takes no arguments. It goes through most of the motions of starting a server, except it won't let the server accept incoming requests. It will then start playing back the request logs. Once finished, it will exit normally.

play_request REQUEST

Plays back a single request, right now, through Jifty->handler. It expects "$request->{ENV}" to be a hashref which will set %ENV. It expects "$request->{cgi}" to be a CGI object which will be passed to "Jifty->handler->handle_request".

play_requests NUMBER, REQUESTs

Plays through a list of requests, sleeping between each. Each request should be a hashref with fields "time" (a possibly fractional number of seconds, representing the time of the request, relative to when the server started); "ENV" (used to set %ENV); and "cgi" (passed to Jifty->handler->handle_request).

The NUMBER is used in logfile naming so different sets of requests don't overwrite the same file.

filename

This is used as a hack to get App::CLI to retrieve our POD correctly.

Inner packages are not given in %INC. If anyone finds a way around this, please let us know.

SEE ALSO

Jifty::Plugin::Recorder Copyright 2007 Best Practical Solutions

This is free software and may be modified and distributed under the same terms as Perl itself.