[Jifty-commit] r5314 - in jifty/trunk: utils

Jifty commits jifty-commit at lists.jifty.org
Wed Apr 16 16:23:27 EDT 2008


Author: sartak
Date: Wed Apr 16 16:23:18 2008
New Revision: 5314

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/utils/js_size.pl

Log:
 r54127 at onn:  sartak | 2008-04-16 16:22:01 -0400
 Have js_size include total numbers


Modified: jifty/trunk/utils/js_size.pl
==============================================================================
--- jifty/trunk/utils/js_size.pl	(original)
+++ jifty/trunk/utils/js_size.pl	Wed Apr 16 16:23:18 2008
@@ -43,18 +43,32 @@
     }
 }
 
+my $min_format = "%6.2f%% (%5.2f%%) %7d (%7d) %s\n";
+my $format = "%6.2f%% %7d %s\n";
+
 for my $file ( @{ Jifty::Web->javascript_libs } ) {
     if ($jsmin) {
-        printf("%5.2f%% (%5.2f%%) %7d (%7d) $file\n",
+        printf($min_format,
            ($size->{$file} / $total * 100),
            ($size_minified->{$file} / $total_minified * 100),
            $size->{$file}, $size_minified->{$file}, $file );
     }
     else {
-        printf("%5.2f%% %7d $file\n",
+        printf($format,
            ($size->{$file} / $total * 100),
            $size->{$file}, $file );
     }
 }
 
-#    
+if ($jsmin) {
+    printf($min_format,
+        100,
+        ($total_minified / $total * 100),
+        $total, $total_minified, 'total');
+}
+else {
+    printf($format,
+        100,
+        $total, 'total');
+}
+


More information about the Jifty-commit mailing list