--- trunk/run.pl 2005/12/31 14:00:36 335 +++ trunk/run.pl 2006/02/19 16:36:42 401 @@ -13,10 +13,11 @@ use WebPAC::Store 0.03; use WebPAC::Normalize::XML; use WebPAC::Output::TT; -use WebPAC::Output::Estraier 0.08; +use WebPAC::Output::Estraier '0.10'; use YAML qw/LoadFile/; use Getopt::Long; use File::Path; +use Time::HiRes qw/time/; =head1 NAME @@ -76,6 +77,7 @@ die "no databases in config file!\n" unless ($config->{databases}); my $total_rows = 0; +my $start_t = time(); while (my ($database, $db_config) = each %{ $config->{databases} }) { @@ -90,6 +92,7 @@ my $est_config = $config->{hyperestraier} || $log->logdie("can't find 'hyperestraier' part in confguration"); $est_config->{database} = $database; $est_config->{clean} = $clean; + $est_config->{label} = $db_config->{name}; my $est = new WebPAC::Output::Estraier( %{ $est_config } ); @@ -105,7 +108,7 @@ $log->info("creating new database $database in $db_path"); rmtree( $db_path ) || $log->warn("can't remove $db_path: $!"); } else { - $log->info("working on $database in $db_path"); + $log->debug("working on $database in $db_path"); } my $db = new WebPAC::Store( @@ -142,7 +145,7 @@ my $input_module = $config->{webpac}->{inputs}->{$type}; - $log->info("working on input $input->{path} [$input->{type}] using $input_module"); + $log->info("working on input '$input->{path}' [$input->{type}] using $input_module lookup '$input->{lookup}'"); my $input_db = new WebPAC::Input( module => $input_module, @@ -205,7 +208,12 @@ }; - $log->info("$total_rows records indexed"); + my $dt = time() - $start_t; + $log->info("$total_rows records indexed in " . + sprintf("%.2f sec [%.2f rec/sec]", + $dt, ($total_rows / $dt) + ) + ); # # add Hyper Estraier links to other databases