Using DBI::Profile to count and time database calls

Bill Moseley <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <CAKhN_m4q=Ev52MR58-z0Hy8fHnmL7aUq=wQSV8G=REVSSUNV=w@mail.gmail.com>
I'm trying to just count number of database queries and the time spent
waiting on the database.

I can use this to just gather grand totals:

DBI::Profile->new( Path => [ ] );

The total time is fine even if it includes the small amount of time in DBI
instead of directly waiting on the database. But, the counts are do not
represent just trips to the database, rather apparently counts of all
methods called (e.g. a prepare and execute counts as 2).

Using:

DBI::Profile->new( Path => [ '!MethodName' ] );

might be ok, but I'd have to then find all the methods that go to the db
(e.g. "execute", "do").

Can I use DBI::Profile to just gather up counts to the database?

Thanks,


-- 
Bill Moseley
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.