mirror of
https://github.com/grocy/grocy.git
synced 2026-04-06 21:06:15 +02:00
correct timings for app build time
This commit is contained in:
parent
a783f90425
commit
80adccb2a0
6
app.php
6
app.php
|
|
@ -53,6 +53,7 @@ if (GROCY_DISABLE_AUTH === true)
|
||||||
}
|
}
|
||||||
fwrite($fp, "!!!App - dep load time : " . round((microtime(true) - $time_start),6) . "\n");
|
fwrite($fp, "!!!App - dep load time : " . round((microtime(true) - $time_start),6) . "\n");
|
||||||
|
|
||||||
|
$app_time_start = microtime(true);
|
||||||
|
|
||||||
// Setup base application
|
// Setup base application
|
||||||
$appContainer = new \Slim\Container([
|
$appContainer = new \Slim\Container([
|
||||||
|
|
@ -64,14 +65,16 @@ $appContainer = new \Slim\Container([
|
||||||
{
|
{
|
||||||
$view_time_start = microtime(true);
|
$view_time_start = microtime(true);
|
||||||
#$view = new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');
|
#$view = new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');
|
||||||
fwrite($fp, "!!!App - view load time : " . round((microtime(true) - $view_time_start),6) . "\n");
|
|
||||||
if (!apcu_exists("views"))
|
if (!apcu_exists("views"))
|
||||||
{
|
{
|
||||||
apcu_store("views", new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache'));
|
apcu_store("views", new \Slim\Views\Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = apcu_fetch("views");
|
$view = apcu_fetch("views");
|
||||||
|
|
||||||
|
$fp = fopen('/config/data/sql.log', 'a');
|
||||||
fwrite($fp, "!!!App - view load time : " . round((microtime(true) - $view_time_start),6) . "\n");
|
fwrite($fp, "!!!App - view load time : " . round((microtime(true) - $view_time_start),6) . "\n");
|
||||||
|
fclose($fp);
|
||||||
return $view;
|
return $view;
|
||||||
},
|
},
|
||||||
'LoginControllerInstance' => function($container)
|
'LoginControllerInstance' => function($container)
|
||||||
|
|
@ -105,6 +108,7 @@ $app = new \Slim\App($appContainer);
|
||||||
|
|
||||||
// Load routes from separate file
|
// Load routes from separate file
|
||||||
require_once __DIR__ . '/routes.php';
|
require_once __DIR__ . '/routes.php';
|
||||||
|
fwrite($fp, "!!!App - App build time in seconds: " . round((microtime(true) - $app_time_start),6) . "\n");
|
||||||
|
|
||||||
#$fp = fopen('/config/data/sql.log', 'a');
|
#$fp = fopen('/config/data/sql.log', 'a');
|
||||||
fwrite($fp, "!!!App starting run\n");
|
fwrite($fp, "!!!App starting run\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user