perl -le 'opendir(D,"huge_directory"); while($_=readdir D) { $t = time()-$^T; $e++ if ( $t!=$prev ); if($n and $e==15){ print $n; $n=$e=0 } $n++; $prev=$t }'
The idea was simply to report how many iterations of "readdir" would finish within each 15-second interval. This seemed to work, but it struck me as crude. Suggestions for improvement?
In reply to How to time a directory scan by graff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |