diff --git a/bin/provision-robo.php b/bin/provision-robo.php index 234763fa257ca0e518cf89e2a920f869aeafca42..491feda6ab56c1ab36a1e0f10bb4eba739cc36c2 100644 --- a/bin/provision-robo.php +++ b/bin/provision-robo.php @@ -2,6 +2,8 @@ use League\Container\Container; use Robo\Robo; +use Robo\Common\TimeKeeper; + // We use PWD if available because getcwd() resolves symlinks, which // could take us outside of the Drupal root, making it impossible to find. $cwd = empty($_SERVER['PWD']) ? getcwd() : $_SERVER['PWD']; @@ -18,10 +20,21 @@ if (file_exists($autoloadFile = __DIR__ . '/vendor/autoload.php') throw new \Exception("Could not locate autoload.php. cwd is $cwd; __DIR__ is " . __DIR__); } +// Start Timer. +$timer = new TimeKeeper(); +$timer->start(); + $input = new \Symfony\Component\Console\Input\ArgvInput($argv); $output = new \Symfony\Component\Console\Output\ConsoleOutput(); $app = new \Aegir\Provision\Provision($input, $output); $status_code = $app->run($input, $output); + +// Stop timer. +$timer->stop(); +if ($output->isVerbose()) { + $output->writeln("" . $timer->formatDuration($timer->elapsed()) . " total time elapsed."); +} + exit($status_code);