+
+ $this->_gather_stats();
+ $conn->option(preferredRecordSyntax => $oldSyntax);
+ $conn->option(elementSetName => $oldESN);
+ $conn->option(presentChunk => $oldPC);
+
+ return $this;
+}
+
+
+sub _gather_stats {
+ my $this = shift();
+
+ foreach my $i (0 .. $this->{n}-1) {
+ my $rec = $this->{rs}->record($i);
+ my $xc = irspy_xpath_context($rec);
+
+ foreach my $node ($xc->findnodes('e:indexInfo/e:index[@search="true"]/e:map/e:attr[@type=1 and @set="bib-1"]')) {
+ $this->{bib1AccessPoints}->{$node->findvalue(".")}++;
+ }
+ }
+}
+
+
+=head2 print()
+
+ $stats->print();
+
+Prints an ugly but human-readable summary of the statistics on
+standard output.
+
+=cut
+
+sub print {
+ my $this = shift();
+
+ print "database = '", $this->{conn}->option("host"), "'\n";
+ print "query = '", $this->{query}, "'\n";
+ print "result set = '", $this->{rs}, "'\n";
+ print "count = '", $this->{n}, "'\n";
+ print "\n";
+ print "BIB-1 ATTRIBUTES\n";
+ my $ap = $this->{bib1AccessPoints};
+ foreach my $attr (sort { $ap->{$b} <=> $ap->{$a}
+ || $a <=> $b } keys %$ap) {
+ print sprintf("%6d%20s%d (%d%%)\n",
+ $attr, "", $ap->{$attr}, 100*$ap->{$attr}/$this->{n});
+ }