-# $Id: Stats.pm,v 1.5 2006-12-18 15:34:27 mike Exp $
+# $Id: Stats.pm,v 1.7 2007-10-31 16:42:13 mike Exp $
package ZOOM::IRSpy::Stats;
An indication of the IRSpy database that statistics are required for.
This may be in the form of a C<ZOOM::Connection> object or a
-database-name string such as C<localhost:3313/IR-Explain---1>.
+database-name string such as C<localhost:8018/IR-Explain---1>.
=item $query (optional)
$this->{domains}->{$host}++;
# Implementation
- ### Requires XSLT fix
+ foreach my $node ($xc->findnodes('i:status/i:serverImplementationName/@value')) {
+ $this->{implementation}->{$node->findvalue(".")}++;
+ last; # This is because many of the records are still
+ # polluted with multiple implementationName elements
+ # from back then XSLT stylesheet that generated
+ # ZeeRex records was wrong.
+ }
}
}
print sprintf("%-26s%5d (%d%%)\n",
$key, $hr->{$key}, 100*$hr->{$key}/$this->{n});
}
+
+ print "\nIMPLEMENTATIONS\n";
+ $hr = $this->{implementation};
+ foreach my $key (sort { $hr->{$b} <=> $hr->{$a}
+ || $a cmp $b } keys %$hr) {
+ print sprintf("%-26s%5d (%d%%)\n",
+ $key, $hr->{$key}, 100*$hr->{$key}/$this->{n});
+ }
}