ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/bin/treescan
(Generate patch)

Comparing IO-AIO/bin/treescan (file contents):
Revision 1.13 by root, Tue Oct 4 18:29:04 2011 UTC vs.
Revision 1.14 by root, Tue Oct 4 18:33:26 2011 UTC

53 53
54 IO::AIO::poll_cb; 54 IO::AIO::poll_cb;
55 55
56 if ($opt_progress and $n_last + 1 < Time::HiRes::time) { 56 if ($opt_progress and $n_last + 1 < Time::HiRes::time) {
57 $n_last = Time::HiRes::time; 57 $n_last = Time::HiRes::time;
58 printf STDERR "\r%d dirs %d files %d stats %g stats/s ", $n_dirs, $n_files, $n_stats, $n_stats / ($n_last - $n_start) 58 my $d = $n_last - $n_start;
59 printf STDERR "\r%d dirs (%g/s) %d files (%g/s) %d stats (%g/s) ",
60 $n_dirs, $n_dirs / $d,
61 $n_files, $n_files / $d,
62 $n_stats, $n_stats / $d
59 if $opt_progress; 63 if $opt_progress;
60 } 64 }
61 65
62 aioreq_pri -1; 66 aioreq_pri -1;
63 ++$n_dirs; 67 ++$n_dirs;
86IO::AIO::max_outstanding 100; # two fds per directory, so limit accordingly 90IO::AIO::max_outstanding 100; # two fds per directory, so limit accordingly
87IO::AIO::min_parallel 20; 91IO::AIO::min_parallel 20;
88 92
89for my $seed (@ARGV) { 93for my $seed (@ARGV) {
90 $seed =~ s/\/+$//; 94 $seed =~ s/\/+$//;
91 ++$n_stats;
92 aio_lstat "$seed/.", sub { 95 aio_lstat "$seed/.", sub {
93 if ($_[0]) { 96 if ($_[0]) {
94 print STDERR "$seed: $!\n"; 97 print STDERR "$seed: $!\n";
95 } elsif (-d _) { 98 } elsif (-d _) {
96 scan $seed; 99 scan $seed;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines