Add ServerTimingMiddleware

This commit is contained in:
Greyscale 2020-11-13 10:49:18 +01:00
parent c5a500b633
commit 846b1a7121
No known key found for this signature in database
GPG key ID: C6178C19949CFFE3
2 changed files with 4 additions and 0 deletions

View file

@ -71,6 +71,7 @@
"symfony/twig-bridge": "^5.1", "symfony/twig-bridge": "^5.1",
"symfony/yaml": "^5.1", "symfony/yaml": "^5.1",
"thecodingmachine/phpstan-strict-rules": "^0.12", "thecodingmachine/phpstan-strict-rules": "^0.12",
"tuupola/server-timing-middleware": "^0.8.2",
"twig/intl-extra": "^3.0" "twig/intl-extra": "^3.0"
}, },
"suggest": { "suggest": {

View file

@ -41,6 +41,7 @@ use Symfony\Bridge\Twig\Extension as SymfonyTwigExtensions;
use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Filesystem\Exception\IOException;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Translation; use Symfony\Component\Translation;
use Tuupola\Middleware\ServerTimingMiddleware;
use Twig; use Twig;
use Twig\Loader\FilesystemLoader; use Twig\Loader\FilesystemLoader;
@ -97,6 +98,8 @@ class App
$this->debugBar['time']->startMeasure('interrogateTranslations', 'Time to interrogate translation files'); $this->debugBar['time']->startMeasure('interrogateTranslations', 'Time to interrogate translation files');
$this->interrogateTranslations(); $this->interrogateTranslations();
$this->debugBar['time']->stopMeasure('interrogateTranslations'); $this->debugBar['time']->stopMeasure('interrogateTranslations');
$this->app->add(new ServerTimingMiddleware());
} }
public function getCachePath(): string public function getCachePath(): string