Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Live operations-per-second counter

by blueberryCoffee (Scribe)
on Mar 21, 2005 at 00:15 UTC ( [id://441085]=note: print w/replies, xml ) Need Help??


in reply to Live operations-per-second counter

just count and average as you go.
$setTimeStart = time; $setCount = 0; while (<IN>) { # process line here $setCount++; # show line speed for every 1000 lines so prints don't # slow you down so much if($setCount < 999) { $setCount = 0; $setTime = time - $setTimeStart; print "processing 1000 lines at " . $setTime/1000 . " per line\n +"; $setTimeStart = time; } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found