[Bio] / FigKernelPackages / Stats.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Stats.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6, Fri Jul 11 01:02:28 2008 UTC revision 1.7, Tue Sep 30 15:18:59 2008 UTC
# Line 215  Line 215 
215      my $retVal = "";      my $retVal = "";
216      # Get the map.      # Get the map.
217      my $map = $self->{Map};      my $map = $self->{Map};
218        # Get the key list.
219        my @keys = sort keys %{$map};
220        # Convert all the statistics to integers.
221        my %intMap;
222        for my $statKey (@keys) {
223            $intMap{$statKey} = sprintf("%d", $map->{$statKey});
224        }
225      # Compute the key size.      # Compute the key size.
226      my $keySize = Tracer::Max(map { length $_ } keys %{$map}) + 1;      my $keySize = Tracer::Max(map { length $_ } @keys) + 1;
227      my $statSize = Tracer::Max(map { length "$map->{$_}" } keys %{$map}) + 1;      my $statSize = Tracer::Max(map { length "$intMap{$_}" } @keys) + 1;
228      # Loop through the statistics.      # Loop through the statistics.
229      for my $statKey (sort keys %{$map}) {      for my $statKey (@keys) {
230          # Add the statistic and its value.          # Add the statistic and its value.
         my $statValue = $map->{$statKey};  
231          $retVal .= Tracer::Pad($statKey, $keySize) .          $retVal .= Tracer::Pad($statKey, $keySize) .
232                     Tracer::Pad($statValue, $statSize, 'left') . "\n";                     Tracer::Pad($intMap{$statKey}, $statSize, 'left') . "\n";
233      }      }
234      # Display the messages.      # Display the messages.
235      $retVal .= "\n" . $self->{Messages} . "\n";      $retVal .= "\n" . $self->{Messages} . "\n";

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3