Add totalquery time in debugbar (like Doctrine does)
This commit is contained in:
parent
2171755e5a
commit
9c60a5ccac
2 changed files with 14 additions and 0 deletions
|
|
@ -40,6 +40,16 @@ class ElasticaDataCollector extends DataCollector
|
|||
return $this->data['queries'];
|
||||
}
|
||||
|
||||
public function getTime()
|
||||
{
|
||||
$time = 0;
|
||||
foreach ($this->data['queries'] as $query) {
|
||||
$time += $query['executionMS'];
|
||||
}
|
||||
|
||||
return $time;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@
|
|||
<b>Queries</b>
|
||||
<span>{{ collector.querycount }}</span>
|
||||
</div>
|
||||
<div class="sf-toolbar-info-piece">
|
||||
<b>Query Time</b>
|
||||
<span>{{ '%0.2f'|format(collector.time * 1000) }} ms</span>
|
||||
</div>
|
||||
{% endset %}
|
||||
{% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': profiler_url } %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue