<p>Off the top of my head, I don't think it's going to be possible, at least in the context of outputting it from a Twig variable.  That info comes from Yii's <a href="http://www.yiiframework.com/doc/api/1.1/CProfileLogRoute" rel="nofollow noreferrer">CProfileLogRoute</a> class, which Craft extends at <a href="https://craftcms.com/classreference/etc/logging/ProfileLogRoute" rel="nofollow noreferrer">etc\logging\ProfileLogRoute</a>.</p>

<p>But with all of Yii's logging, that stuff doesn't get flushed to disk (for FileLogRoute) or to the browser's console (for ProfileLogRoute) until the very end of the request, which will be after the template has already rendered.</p>

<p>If you view source with devMode enabled, you can see they just append it to the very end of the DOM.</p>

<p>Maybe you could write a plugin that used <code>craft()-&gt;log-&gt;addLogRoute()</code> that added your own custom ProfileLogRoute that extended Craft's and instead of appending to the end of the DOM, added it to some other part of the template, but seems like a pretty brittle solution.</p>

CC BY-SA 3.0
2016-12-10T23:00:15.380Z
2016-12-11T13:57:35.577Z
2016-12-11T13:57:35.577Z
Brad Bell
<p>Is it possible to output Profiling Summary Report when in devMode? Looking to print this out onto a template:</p>

<pre><code>Time:   0.36980s
Memory: 20,563Kb
Total Queries: 19
</code></pre>

<devmode><logging>
Is it possible to output Profiling Summary Report (devMode)
# Is it possible to output Profiling Summary Report (devMode)

(Asked by: username_0 on 2016-12-10)

Is it possible to output Profiling Summary Report when in devMode? Looking to print this out onto a template:
Time:   0.36980s
Memory: 20,563Kb
Total Queries: 19

**Tags:** devmode, logging


---

## 1 answers

### Answer by username_1 on 2016-12-10. Score: 2 | Accepted answer

Off the top of my head, I don't think it's going to be possible, at least in the context of outputting it from a Twig variable. That info comes from Yii's [CProfileLogRoute](http://www.yiiframework.com/doc/api/1.1/CProfileLogRoute) class, which Craft extends at [etc\logging\ProfileLogRoute](https://craftcms.com/classreference/etc/logging/ProfileLogRoute).

But with all of Yii's logging, that stuff doesn't get flushed to disk (for FileLogRoute) or to the browser's console (for ProfileLogRoute) until the very end of the request, which will be after the template has already rendered.

If you view source with devMode enabled, you can see they just append it to the very end of the DOM.

Maybe you could write a plugin that used `craft()->log->addLogRoute()` that added your own custom ProfileLogRoute that extended Craft's and instead of appending to the end of the DOM, added it to some other part of the template, but seems like a pretty brittle solution.


---

