{% extends app.request.isXmlHttpRequest ? 'WebProfilerBundle:Profiler:ajax_layout.html.twig' : 'WebProfilerBundle:Profiler:layout.html.twig' %} {% block toolbar %} {% set icon %} Database {{ collector.querycount }} {% if collector.querycount > 0 %} in {{ '%0.2f'|format(collector.time * 1000) }} ms {% endif %} {% if collector.invalidEntityCount > 0 %} {{ collector.invalidEntityCount }} {% endif %} {% if collector.cacheEnabled %} 2l cache {% endif %} {% endset %} {% set text %}
DB 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 }}
{% endif %} {% endset %} {% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %} {% endblock %} {% block menu %} Doctrine {{ collector.querycount }} {{ '%0.0f'|format(collector.time * 1000) }} ms {% endblock %} {% block panel %} {% 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 %}

Queries

{% for connection, queries in collector.queries %}

Connection {{ connection }}

{% if queries is empty %}

No queries.

{% else %}

{% for i, query in queries %} {% endfor %}
# Time Info
{{ loop.index }} {{ '%0.2f'|format(query.executionMS * 1000) }} ms
+ - Shrink query {{ query.sql|doctrine_minify_query }}
Parameters: {{ query.params|yaml_encode }}
[Display runnable query]
{% if query.explainable %} [ + - Explain query ] {% else %} This query cannot be explained {% endif %} {% if query.explainable %}
{% endif %}
{% endif %} {% endfor %}

Database Connections

{% if collector.connections %} {% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.connections} only %} {% else %}

No connections.

{% endif %}

Entity Managers

{% if collector.managers %} {% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.managers} only %} {% else %}

No entity managers.

{% endif %}

Second Level Cache

{% if collector.cacheCounts %} {% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.cacheCounts} only %} {% if collector.cacheRegions.hits %}

Number of cache hits

{% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.cacheRegions.hits} only %} {% endif %} {% if collector.cacheRegions.misses %}

Number of cache misses

{% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.cacheRegions.misses} only %} {% endif %} {% if collector.cacheRegions.puts %}

Number of cache puts

{% include 'WebProfilerBundle:Profiler:table.html.twig' with {data: collector.cacheRegions.puts} only %} {% endif %} {% else %}

No cache.

{% endif %}

Mapping

{% for manager, classes in collector.entities %}

Manager {{ manager }}

{% if classes is empty %}

No loaded entities.

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