Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: CPU Monitor

by CoVAX (Beadle)
on Feb 19, 2015 at 04:05 UTC ( [id://1117182]=note: print w/replies, xml ) Need Help??


in reply to CPU Monitor

Have a look at Time::HiRes.

Its Examples section includes an example for timing portions of code.

E.g.:

# measure elapsed time # (could also do by subtracting 2 gettimeofday return values) $t0 = [gettimeofday]; # do bunch of stuff here $t1 = [gettimeofday]; # do more stuff here $t0_t1 = tv_interval $t0, $t1;
Searched for donut and crumpit. Found donate and stumbit instead.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2025-12-17 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (98 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.