--- trunk/run.pl 2006/05/14 22:24:18 504 +++ trunk/run.pl 2006/05/15 13:15:01 507 @@ -55,6 +55,10 @@ force conversion Cpath> in C from C<.xml> to C<.pl> +=item --stats + +dump statistics about used fields and subfields in each input + =back =cut @@ -67,6 +71,7 @@ my $debug = 0; my $only_db_name; my $force_set = 0; +my $stats = 0; GetOptions( "limit=i" => \$limit, @@ -77,6 +82,7 @@ "config" => \$config, "debug" => \$debug, "force-set" => \$force_set, + "stats" => \$stats, ); $config = LoadFile($config); @@ -181,6 +187,7 @@ offset => $offset, lookup => $lookup, recode => $input->{recode}, + stats => $stats, ); $log->logdie("can't create input using $input_module") unless ($input); @@ -255,6 +262,8 @@ $total_rows++; } + $log->info("statistics of fields usage:\n", $input_db->stats) if ($stats); + }; eval { $indexer->finish } if ($indexer->can('finish'));