Permalink
Browse files

Improved the debug report

  • Loading branch information...
dpobel committed Apr 4, 2012
1 parent 3548fd4 commit 6f6facc740ce414c8e4d6c96c8998b0cc40f1ca8
Showing with 6 additions and 8 deletions.
  1. +6 −8 classes/fepoptimizer.php
View
@@ -18,18 +18,16 @@ class fepOptimizer
*/
public static function report( $debugSettings, $name, $originalCodeSize, $optimizedCodeSize )
{
+ $p = round( $optimizedCodeSize * 100/$originalCodeSize, 1 );
eZDebugSetting::writeDebug(
$debugSettings,
- 'Original size: ' . $originalCodeSize,
- $name
- );
- eZDebugSetting::writeDebug(
- $debugSettings,
- 'Optimized size: ' . $optimizedCodeSize
- . ' (' . round( $optimizedCodeSize * 100/$originalCodeSize, 1 ) . '%)',
+ 'Original size: ' . $originalCodeSize . " bytes\n" .
+ 'Optimized size: ' . $optimizedCodeSize .
+ ' bytes (' . $p . '% of the original size)' . "\n" .
+ 'Saved: ' . ( $originalCodeSize - $optimizedCodeSize ) .
+ ' bytes (' . ( 100 - $p ) . '%)',
$name
);
}
-
}

0 comments on commit 6f6facc

Please sign in to comment.