Browse Source

[DependencyInjection] removed pass time

Johannes Schmitt 14 years ago
parent
commit
ff41541d45

+ 0 - 26
src/Symfony/Component/DependencyInjection/Compiler/Compiler.php

@@ -22,8 +22,6 @@ use Symfony\Component\DependencyInjection\Compiler\PassConfig;
 class Compiler
 class Compiler
 {
 {
     private $passConfig;
     private $passConfig;
-    private $currentPass;
-    private $currentStartTime;
     private $log;
     private $log;
     private $loggingFormatter;
     private $loggingFormatter;
     private $serviceReferenceGraph;
     private $serviceReferenceGraph;
@@ -109,33 +107,9 @@ class Compiler
     {
     {
         $start = microtime(true);
         $start = microtime(true);
         foreach ($this->passConfig->getPasses() as $pass) {
         foreach ($this->passConfig->getPasses() as $pass) {
-            $this->startPass($pass);
             $pass->process($container);
             $pass->process($container);
-            $this->endPass($pass);
         }
         }
 
 
         $this->addLogMessage(sprintf('Compilation finished in %.3fs.', microtime(true) - $start));
         $this->addLogMessage(sprintf('Compilation finished in %.3fs.', microtime(true) - $start));
     }
     }
-
-    /**
-     * Starts an individual pass.
-     *
-     * @param CompilerPassInterface $pass The pass to start
-     */
-    private function startPass(CompilerPassInterface $pass)
-    {
-        $this->currentPass = $pass;
-        $this->currentStartTime = microtime(true);
-    }
-
-    /**
-     * Ends an individual pass.
-     *
-     * @param CompilerPassInterface $pass The compiler pass
-     */
-    private function endPass(CompilerPassInterface $pass)
-    {
-        $this->currentPass = null;
-        $this->addLogMessage($this->loggingFormatter->formatPassTime($pass, microtime(true) - $this->currentStartTime));
-    }
 }
 }

+ 0 - 5
src/Symfony/Component/DependencyInjection/Compiler/LoggingFormatter.php

@@ -31,11 +31,6 @@ class LoggingFormatter
         return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId));
         return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId));
     }
     }
 
 
-    public function formatPassTime(CompilerPassInterface $pass, $time)
-    {
-        return $this->format($pass, sprintf('finished in %.3fs.', $time));
-    }
-
     public function format(CompilerPassInterface $pass, $message)
     public function format(CompilerPassInterface $pass, $message)
     {
     {
         return sprintf('%s: %s', get_class($pass), $message);
         return sprintf('%s: %s', get_class($pass), $message);