--- trunk/scripts/est-spider 2006/01/26 01:53:29 90 +++ trunk/scripts/est-spider 2006/04/16 23:22:54 118 @@ -7,6 +7,7 @@ use Text::Iconv; #use File::MMagic; use File::MMagic::XS qw/:compat/; +use Time::HiRes qw/time/; my $collection; # name which will be inserted my $path_add; # add additional info in path @@ -49,6 +50,9 @@ #$basedir =~ s,/[^/]+$,/,; #require "$basedir/filter.pm"; +my $docs = 0; +my $start_t = time(); + my $filter; foreach my $f (qw/pdftotext pstotext/) { my $w = which($f); @@ -76,6 +80,8 @@ no_chdir => 1, }, $dir); +my $dur = (time() - $start_t) || 1; +printf STDERR "%d documents in %.2fs [%.2f docs/s]\n", $docs, $dur, ($docs / $dur); exit; @@ -129,6 +135,8 @@ # register the document object to the database $db->put_doc($doc); + $docs++; + } sub filter_to_pages {