mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 10:42:16 +05:30
Добавлена запись метрики времени работы приложения
This commit is contained in:
parent
42b6bc561e
commit
72f546c827
@ -4,6 +4,8 @@ use api\aop\AspectKernel;
|
|||||||
use common\config\ConfigLoader;
|
use common\config\ConfigLoader;
|
||||||
use yii\web\Application;
|
use yii\web\Application;
|
||||||
|
|
||||||
|
$time = microtime(true);
|
||||||
|
|
||||||
require __DIR__ . '/../../vendor/autoload.php';
|
require __DIR__ . '/../../vendor/autoload.php';
|
||||||
|
|
||||||
defined('YII_DEBUG') or define('YII_DEBUG', in_array(getenv('YII_DEBUG'), ['true', '1']));
|
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 = new Application($config);
|
||||||
$application->run();
|
$application->run();
|
||||||
|
|
||||||
|
$timeDifference = (microtime(true) - $time) * 1000;
|
||||||
|
fastcgi_finish_request();
|
||||||
|
Yii::$app->statsd->time('request.time', $timeDifference);
|
||||||
|
Loading…
Reference in New Issue
Block a user