From 72f546c827da04d4515b560db04ed4ac88c89177 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Fri, 17 Nov 2017 03:04:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D1=8C=20=D0=BC?= =?UTF-8?q?=D0=B5=D1=82=D1=80=D0=B8=D0=BA=D0=B8=20=D0=B2=D1=80=D0=B5=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/web/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api/web/index.php b/api/web/index.php index 09a6f8b..00517a7 100644 --- a/api/web/index.php +++ b/api/web/index.php @@ -4,6 +4,8 @@ use api\aop\AspectKernel; use common\config\ConfigLoader; use yii\web\Application; +$time = microtime(true); + require __DIR__ . '/../../vendor/autoload.php'; defined('YII_DEBUG') or define('YII_DEBUG', in_array(getenv('YII_DEBUG'), ['true', '1'])); @@ -29,3 +31,7 @@ $config = ConfigLoader::load('api'); $application = new Application($config); $application->run(); + +$timeDifference = (microtime(true) - $time) * 1000; +fastcgi_finish_request(); +Yii::$app->statsd->time('request.time', $timeDifference);