Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Timing Your Program

by cjensen (Sexton)
on Oct 02, 2001 at 00:47 UTC ( [id://115970]=note: print w/replies, xml ) Need Help??


in reply to Timing Your Program

You might look at Time::HiRes which implements hi resolution versions of time, alarm and sleep. Get and store the time of day in floating seconds (or seconds and microseconds) at whatever parts of your script it makes sense to watch. At the end, use the supplied tv_interval subroutine to compute the differences between two fractional times. I use this in conjunction with Apache::Scoreboard to do some near real-time monitoring of high traffic web servers, attempting to subtract the time it takes to execute commands and receive scoreboard information from a fixed interval so that the timing and calculations are more accurate. It works well.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://115970]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-20 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found