{% extends app.request.isXmlHttpRequest ? '@WebProfiler/Profiler/ajax_layout.html.twig' : '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% set icon %} {% if profiler_markup_version == 1 %} Database {{ collector.querycount }} {% if collector.querycount > 0 %} in {{ '%0.2f'|format(collector.time * 1000) }} ms {% endif %} {% if collector.invalidEntityCount > 0 %} {{ collector.invalidEntityCount }} {% endif %} {% else %} {% if collector.querycount > 0 or collector.invalidEntityCount > 0 %} {% set status = collector.invalidEntityCount > 0 ? 'red' : collector.querycount > 50 ? 'yellow' %} {{ include('@Doctrine/Collector/icon.svg') }} {% if collector.querycount == 0 and collector.invalidEntityCount > 0 %} {{ collector.invalidEntityCount }} errors {% else %} {{ collector.querycount }} in {{ '%0.2f'|format(collector.time * 1000) }} ms {% endif %} {% endif %} {% endif %} {% endset %} {% set text %}
Database Queries {{ collector.querycount }}
Query time {{ '%0.2f'|format(collector.time * 1000) }} ms
Invalid entities {{ collector.invalidEntityCount }}
{% if collector.cacheEnabled %}
Cache hits {{ collector.cacheHitsCount }}
Cache misses {{ collector.cacheMissesCount }}
Cache puts {{ collector.cachePutsCount }}
{% else %}
Second Level Cache disabled
{% endif %} {% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status|default('') }) }} {% endblock %} {% block menu %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% if profiler_markup_version == 1 %} Doctrine {{ collector.querycount }} {{ '%0.0f'|format(collector.time * 1000) }} ms {% else %} {{ include('@Doctrine/Collector/icon.svg') }} Doctrine {% if collector.invalidEntityCount %} {{ collector.invalidEntityCount }} {% endif %} {% endif %} {% endblock %} {% block panel %} {% set profiler_markup_version = profiler_markup_version|default(1) %} {% if 'explain' == page %} {{ render(controller('DoctrineBundle:Profiler:explain', { token: token, panel: 'db', connectionName: app.request.query.get('connection'), query: app.request.query.get('query') })) }} {% else %} {{ block('queries') }} {% endif %} {% endblock %} {% block queries %} {% if profiler_markup_version == 1 %} {% endif %}

Queries

{% for connection, queries in collector.queries %} {% if collector.connections|length > 1 %}

{{ connection }} connection

{% endif %} {% if queries is empty %}

No database queries were performed.

{% else %} {% for i, query in queries %} {% endfor %}
# Time Info
{{ loop.index }} {{ '%0.2f'|format(query.executionMS * 1000) }} ms {{ query.sql|doctrine_pretty_query(highlight_only = true) }}
Parameters: {{ query.params|yaml_encode }}
View formatted query    View runnable query {% if query.explainable %}    Explain query {% endif %}
{% if query.explainable %}
{% endif %}
{% endif %} {% endfor %}

Database Connections

{% if not collector.connections %}

There are no configured database connections.

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.connections, labels: ['Name', 'Service'] }, with_context = false ) }} {% endif %}

Entity Managers

{% if not collector.managers %}

There are no configured entity managers.

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.managers, labels: ['Name', 'Service'] }, with_context = false ) }} {% endif %}

Second Level Cache

{% if not collector.cacheEnabled %}

Second Level Cache is not enabled.

{% else %} {% if not collector.cacheCounts %}

Second level cache information is not available.

{% else %} {% if profiler_markup_version == 1 %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheCounts }, with_context = false) }} {% else %}
{{ collector.cacheCounts.hits }} Hits
{{ collector.cacheCounts.misses }} Misses
{{ collector.cacheCounts.puts }} Puts
{% endif %} {% if collector.cacheRegions.hits %}

Number of cache hits

{{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheRegions.hits }, with_context = false) }} {% endif %} {% if collector.cacheRegions.misses %}

Number of cache misses

{{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheRegions.misses }, with_context = false) }} {% endif %} {% if collector.cacheRegions.puts %}

Number of cache puts

{{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.cacheRegions.puts }, with_context = false) }} {% endif %} {% endif %} {% endif %}

Entities Mapping

{% for manager, classes in collector.entities %} {% if collector.managers|length > 1 %}

{{ manager }} entity manager

{% endif %} {% if classes is empty %}

No loaded entities.

{% else %} {% for class in classes %} {% set contains_errors = collector.mappingErrors[manager] is defined and collector.mappingErrors[manager][class] is defined %} {% endfor %}
Class Mapping errors
{{ class }} {% if contains_errors %}
    {% for error in collector.mappingErrors[manager][class] %}
  • {{ error }}
  • {% endfor %}
{% else %} No errors. {% endif %}
{% endif %} {% endfor %} {% endblock %}