diff --git a/deep_fixitycheck.pl b/deep_fixitycheck.pl index b2be16a0b848bda96518b3a7aabd0f20535b99ce..99a3814c4fc0fbb17a5eb3a7897b570c5c5df9bd 100644 --- a/deep_fixitycheck.pl +++ b/deep_fixitycheck.pl @@ -23,7 +23,6 @@ use feature qw(say); use Carp; use Path::Tiny; use File::Find; -use File::Sort qw(sort_file); use XML::LibXML; use Time::Progress; use XML::LibXML::XPathContext; @@ -296,6 +295,7 @@ if (defined $search_dir && -d "$search_dir") { $stat->{IEs} = 0; $stat->{files} = 0; $stat->{errors} = 0; + $stat->{begin} = time; while ( <$fh_unsorted_file>) { $stat->{IEs}++; chomp; @@ -319,14 +319,17 @@ if (defined $search_dir && -d "$search_dir") { path($report_file)->append_utf8("\t$errors\n"); } $stat->{errors} += $result->{errors}; - } else { - path($report_file)->append_utf8("IE $_ is fine! :)\n"); } } # write report } say ""; - say "Scanned $stat->{IEs} IEs with $stat->{files} files, found $stat->{errors} errors"; + $stat->{end} = time; + $stat->{duration} = $stat->{end} - $stat->{begin}; + $stat->{scansize} = `du -hs $search_dir`; + my $summary = "Scanned $stat->{IEs} IEs with $stat->{files} files ($stat->{scansize}) in $stat->{duration} seconds, found $stat->{errors} errors"; + path($report_file)->append_utf8("$summary\n"); + say $summary; } else { die "no directory given on commandline"; }