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.10 by root, Tue Oct 4 18:22:37 2011 UTC vs.
Revision 1.13 by root, Tue Oct 4 18:29:04 2011 UTC

28@ARGV = "." unless @ARGV; 28@ARGV = "." unless @ARGV;
29 29
30$opt_grep &&= qr{$opt_grep}s; 30$opt_grep &&= qr{$opt_grep}s;
31 31
32my ($n_dirs, $n_files, $n_stats) = (0, 0, 0); 32my ($n_dirs, $n_files, $n_stats) = (0, 0, 0);
33my $n_last;
34my $n_start = Time::HiRes::time; 33my ($n_last, $n_start) = (Time::HiRes::time) x 2;
35 34
36sub printfn { 35sub printfn {
37 my ($prefix, $files, $suffix) = @_; 36 my ($prefix, $files, $suffix) = @_;
38 37
39 if ($opt_grep) { 38 if ($opt_grep) {
54 53
55 IO::AIO::poll_cb; 54 IO::AIO::poll_cb;
56 55
57 if ($opt_progress and $n_last + 1 < Time::HiRes::time) { 56 if ($opt_progress and $n_last + 1 < Time::HiRes::time) {
58 $n_last = Time::HiRes::time; 57 $n_last = Time::HiRes::time;
59 printf STDERR "%7d dirs %7d files %7d stats %g stats/s \r", $n_dirs, $n_files, $n_stats, $n_stats / ($n_last - $n_start) 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)
60 if $opt_progress; 59 if $opt_progress;
61 } 60 }
62 61
63 aioreq_pri -1; 62 aioreq_pri -1;
64 ++$n_dirs; 63 ++$n_dirs;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines