From 204a64f006992894b57811596e2e66e91c912216 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Mon, 25 Jun 2012 14:56:04 +0300 Subject: [PATCH] Simply use the LARAVEL_START constant for calculation page generation time in profiler. --- laravel/profiling/profiler.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/laravel/profiling/profiler.php b/laravel/profiling/profiler.php index d39f8bd9..4fd9c183 100644 --- a/laravel/profiling/profiler.php +++ b/laravel/profiling/profiler.php @@ -15,15 +15,6 @@ class Profiler { */ protected static $data = array('queries' => array(), 'logs' => array()); - /** - * The time when the profiler was setup. - * - * This is used for generating the total page rendering time. - * - * @var float - */ - protected static $start_time; - /** * Get the rendered contents of the Profiler. * @@ -37,10 +28,7 @@ class Profiler { // type applications, so we will not send anything in those scenarios. if ( ! Request::ajax()) { - if (static::$start_time) - { - static::$data['time'] = number_format((microtime(true) - static::$start_time) * 1000, 2); - } + static::$data['time'] = number_format((microtime(true) - LARAVEL_START) * 1000, 2); return render('path: '.__DIR__.'/template'.BLADE_EXT, static::$data); } } @@ -80,9 +68,6 @@ class Profiler { */ public static function attach() { - // Record when the profiler was setup (as a rough measure for render time) - static::$start_time = microtime(true); - // First we'll attach to the query and log events. These allow us to catch // all of the SQL queries and log messages that come through Laravel, // and we will pass them onto the Profiler for simple storage.