Forwarding to dbi-dev. This is where it belongs. Sam: Subscribe to dbi-dev if you haven't yet done so.
Ilya -----Original Message----- From: Sam Tregar To: [EMAIL PROTECTED] Sent: 9/30/02 4:27 PM Subject: DBI::Profile meets Devel::DProf? Hello all. I'm thinking about creating a DBI::Profile subclass to enable profiling of database queries in large Apache/mod_perl applications. I built a similar system for the Bricolage project (http://bricolage.cc), which uses a DBI wrapper class. Now I'd like to create a module that offers similar facilities to all Apache/mod_perl DBI applications. Here's my plan: - At runtime, instead of displaying output, dump the collected profiling data into a data file. This would be the equivalent of the tmon.out file produced by Devel::DProf and Devel::Profiler. - Write a separate program to slice and dice the collected data after a run is complete. This would be equivalent to dprofpp from Devel::DProf. - Create an add-on class to interface this sub-class with Apache/mod_perl enabling each Apache process to produce a separate DBI::Profile dump. These can then be viewed independently using the dprofpp work-alike. This would be equivalent to the functionality of Apache::DProf and Devel::Profile::Apache. Additional ideas, not required by my needs but possibly desirable: - Build the sub-class in such a way that it does not accumulate profiling data in-memory without limit. Devel::DProf and Devel::Profiler accomplish this by doing buffered writes of raw deltas into the data file and only assembling the full picture after the fact. A quick think on the interface offered by DBI::Profile suggests that this would be impossible without rewriting DBI::Profile. - Allow multiple data files produced by the Apache module to be merged into one. This is something I wanted to do with Devel::Profiler but it seems more possible in this context. Given the above, help me answer these questions: - Is it possible? - What possible problems do you think I will encounter? - Would you use it? - What should I name it? Ideas: DBIx::DProf, DBIx::Profiler... - Any other comments? Thanks, -sam