Subject: | expand TRACE_PROFILE |
Expand TRACE_PROFILE to also accumulate CPU time in event handlers.
Currently it only counts the number of times each handler is called.
Use times() to gather the CPU time, and accumulate the time in a hash.
The accumulated CPU time may be kept in a second field of the profiling
hash, or it may be kept in a separate hash.
Calculate the program's load average (as a percent) by summing the
handlers' CPU time and dividing it by the wall time.
Calculate POE's overhead (as a percent) by dividing the sum of the
handlers' CPU time by the total CPU time of the program.