Algorithmique Numérique Distribuée Public GIT Repository
 author alegrand Tue, 13 Apr 2010 22:22:09 +0000 (22:22 +0000) committer alegrand Tue, 13 Apr 2010 22:22:09 +0000 (22:22 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7557 48e7efb5-ca39-0410-a469-dd3cf9ba447f

index 5d3db52..36dc8aa 100755 (executable)
@@ -12,11 +12,11 @@ while(\$line = <STDIN>) {
}
next;
}
-    if(\$line =~ /^\s*year\s*=\s*/) {
+    if(\$line =~ /^\s*year\s*=\s*/i) {
\$year = \$line;
\$year =~ s/\D*//g;
}
-    if(\$line =~ /^\s*category\s*=\s*/) {
+    if(\$line =~ /^\s*category\s*=\s*/i) {
\$cat = \$line;
\$cat =~ s/^.*=//;
\$cat =~ s/\s*//g;
@@ -64,5 +64,25 @@ foreach \$cat (keys %count) {
print "<td>\$sum</td>\n";
print "</tr>\n";
}
+
+
+
+print "<tr><td>Total </td>";
+
+\$ssum=0;
+foreach \$year (\$year_min..\$year_max) {
+    \$sum = 0;
+    foreach \$cat (keys %count) {
+       if(defined(\$count{\$cat}{\$year})) {
+           \$sum+=\$count{\$cat}{\$year};
+       }
+    }
+    \$ssum+=\$sum;
+    print "<td>\$sum</td> ";
+}
+print "<td>\$ssum</td> ";
+print "</tr>\n";
+
+
print "</table>\n";