blahblahblah has asked for the wisdom of the Perl Monks concerning the following question:
I'd like to know how much time is spent parsing and compiling each of our scripts each time they're run. I had the idea that the first line of my program could call 'time' and subtract $^T from it. Does $^T get set early enough that this would give me reasonable data? From this test script, it seems like it might:
The time is outputted before the compilation error.BEGIN { print "BEGIN: $^T\n"; } oh no!
I also thought about using the apache logs. I think I remember seeing a while ago that there's a way to record the total script time from there. I haven't looked into that yet. That would also hopefully include the overhead of apache starting a new process, so it might be more useful.
Any other ideas on measuring the startup overhead of running cgi scripts? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: measuring startup time: how early does $^T (start time of program) get set?
by bart (Canon) on Mar 03, 2004 at 23:22 UTC | |
|
Re: measuring startup time: how early does $^T (start time of program) get set?
by tachyon (Chancellor) on Mar 03, 2004 at 21:32 UTC |