NAME
DBIx::Profile - DBI query profiler
Copyright (c) 1999 Jeff Lathan, Kerry Clendinning.
All rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SYNOPSIS
use DBIx::Profile;
$dbh = DBIx::Profile->connect(blah...blah);
$dbh->printProfile();
$dbh->disconnect();
DESCRIPTION
DBIx::Profile is a quick and easy, and mostly transparent, profiler
for scripts using DBI. It collects information on the query
level, and keeps track of first, failed, normal, and total amounts
(count, wall clock, cput time) for each function on the query.
Not all DBI methods are profiled at this time.
Except for replacing the existing "use" and "connect" statements,
DBIx::Profile allows DBI functions to be called as usual on handles.
RECIPE
1) Add "use DBIx::Profile"
2) Change connects from "DBI->connect" to "DBIx::Profile->connect"
3) Add "DBIx::Profile->init_rootclass;" before the connect
4) Optional: add $dbh->printProfile (will execute during
disconnect otherwise)
5) Run code
6) Data output will happen at printProfile or $dbh->disconnect;
METHODS
printProfile
$dbh->printProfile();
Will print out the data collected.
If this is not called before disconnect, disconnect will call
printProfile.
disconnect
$dbh->disconnect();
Calls printProfile if it has not yet been called.
AUTHORS
Jeff Lathan, jlathan@deja.com
Kerry Clendinning, kerry@deja.com
SEE ALSO
perl(1).