From 11814ce603fac61fd89a0793d5c2b818ead66ba8 Mon Sep 17 00:00:00 2001 From: Olivier Lechevalier Date: Sat, 26 Oct 2019 23:11:28 +0900 Subject: [PATCH] Add total time to profiler. (#278) [Profiler] Add total time to profiler. --- src/Resources/public/css/main.css | 12 +++++++++++- src/Resources/views/profiler.html.twig | 17 +++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/Resources/public/css/main.css b/src/Resources/public/css/main.css index 3df387a..f42a9dc 100644 --- a/src/Resources/public/css/main.css +++ b/src/Resources/public/css/main.css @@ -30,7 +30,7 @@ } -#gb_profiler .gb_request { +#gb_profiler .gb_request, #gb_profiler .gb_overview { width: 100%; margin-bottom: 7px; border-radius: 6px; @@ -87,6 +87,16 @@ border-radius: 4px; } +#gb_profiler .gb_overview, +#gb_profiler .gb_overview h2, +#gb_profiler .gb_overview table, +#gb_profiler .gb_overview table tr, +#gb_profiler .gb_overview table th, +#gb_profiler .gb_overview table td { + border: 1px solid #c3d9ec; + background-color: #e7f0f7; +} + #gb_profiler .gb_request.gb_request--get, #gb_profiler .gb_request.gb_request--get h3, #gb_profiler .gb_request.gb_request--get table, diff --git a/src/Resources/views/profiler.html.twig b/src/Resources/views/profiler.html.twig index 6248d9d..1a64dca 100644 --- a/src/Resources/views/profiler.html.twig +++ b/src/Resources/views/profiler.html.twig @@ -4,6 +4,23 @@

{% else %}
+

Overview

+
+
+ + + + + +
Total time + {% if collector.totalTime > 1.0 %} + {{ '%0.2f'|format(collector.totalTime) }} s + {% else %} + {{ '%0.0f'|format(collector.totalTime * 1000) }} ms + {% endif %} +
+
+
{% for group in collector.logs %}

Group {{ group.requestName }}