$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; } }
In reply to Re: Live operations-per-second counter
by blueberryCoffee
in thread Live operations-per-second counter
by acidmax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |