Permalink
Browse files

adding some copy about the queries with regard to how many and how lo…

…ng they took. more to come for this section soon.
  • Loading branch information...
1 parent fd671e7 commit eec0ae6544d3a53243e71c010d7094c5709b3f37 @tmaiaroto committed Jan 5, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 views/elements/queries.html.php
@@ -1,2 +1,10 @@
-<h2>Queries [<?=count($queries); ?>]</h2>
+<?php
+$total_queries = count($queries);
+$total_query_time = 0;
+foreach($queries as $query) {
+ $total_query_time += $query['explain']['millis'];
+}
+?>
+<h2>Queries</h2>
+<p>There <?php echo ($total_queries == 1) ? 'is':'are'; ?> <span class="li3-perf-stat-value"><?=$total_queries; ?></span> quer<?php echo ($total_queries == 1) ? 'y':'ies'; ?> which took <span class="li3-perf-stat-value"><?=$total_query_time; ?>ms</span> to execute.</p>
<?=$this->li3perf->printVars($queries); ?>

0 comments on commit eec0ae6

Please sign in to comment.