Unified benchmark templates
authorMarcel Werk <burntime@woltlab.com>
Sun, 1 May 2016 13:07:52 +0000 (15:07 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 1 May 2016 13:10:05 +0000 (15:10 +0200)
com.woltlab.wcf/templates/benchmark.tpl
wcfsetup/install/files/acp/templates/benchmark.tpl

index 1d7be2e7ea491b56403c36e86f1132d09f69c230..d790c9d7ba3f7f42208a4cc9a2b79a79eed0802b 100644 (file)
@@ -1,39 +1,39 @@
 <div class="benchmark">
        {if ENABLE_DEBUG_MODE}<a id="benchmark">{/if}Execution time: {@$__wcf->getBenchmark()->getExecutionTime()}s ({#($__wcf->getBenchmark()->getExecutionTime()-$__wcf->getBenchmark()->getQueryExecutionTime())/$__wcf->getBenchmark()->getExecutionTime()*100}% PHP, {#$__wcf->getBenchmark()->getQueryExecutionTime()/$__wcf->getBenchmark()->getExecutionTime()*100}% SQL) | SQL queries: {#$__wcf->getBenchmark()->getQueryCount()} | Memory-Usage: {$__wcf->getBenchmark()->getMemoryUsage()}{if ENABLE_DEBUG_MODE}</a>{/if}
-
-{if ENABLE_DEBUG_MODE}
-       <script data-relocate="true">
-               //<![CDATA[
-               $(function() {
-                       $('#benchmarkDetails > li > span').click(function() {
-                               $(this).parent().children('pre').toggle();
+       
+       {if ENABLE_DEBUG_MODE}
+               <script data-relocate="true">
+                       //<![CDATA[
+                       $(function() {
+                               $('#benchmarkDetails > li > span').click(function() {
+                                       $(this).parent().children('pre').toggle();
+                               });
                        });
-               });
-               //]]>
-       </script>
-       <ul id="benchmarkDetails" style="display: none;">
-               {foreach from=$__wcf->getBenchmark()->getItems() key=benchmarkIndex item=item}
-                       <li id="benchmarkItem{@$benchmarkIndex}" style="margin-bottom: 8px;"{if $item.use >= 0.01} class="hot"{/if}>
-                               <span>{if $item.type == 1}(SQL Query) {/if}{$item.text}</span><br />
-                               <small style="font-size: .85em">Execution time: {@$item.use}s</small>
+                       //]]>
+               </script>
+               <ul id="benchmarkDetails" style="display: none;">
+                       {foreach from=$__wcf->getBenchmark()->getItems() key=benchmarkIndex item=item}
+                               <li id="benchmarkItem{@$benchmarkIndex}" style="margin-bottom: 8px;"{if $item.use >= 0.01} class="hot"{/if}>
+                                       <span>{if $item.type == 1}(SQL Query) {/if}{$item.text}</span><br />
+                                       <small style="font-size: .85em">Execution time: {@$item.use}s</small>
                                
                                <pre style="display: none">{foreach from=$item.trace key=traceNo item=traceItem}#{#$traceNo} {if !$traceItem.class|empty}{$traceItem.class}{$traceItem.type}{else}{if !$traceItem.file|empty}{$traceItem.file}: {/if}{/if}{$traceItem.function}() {if !$traceItem.line|empty}(line {#$traceItem.line}){/if} 
 {/foreach}</pre>
                                
-                       </li>
-               {/foreach}
-       </ul>
-       
-       <script data-relocate="true">
-               //<![CDATA[
-               $(function() {
-                       $('#benchmark').click(function() {
-                               $('#benchmarkDetails').wcfDialog({
-                                       title: 'Log'
+                               </li>
+                       {/foreach}
+               </ul>
+               
+               <script data-relocate="true">
+                       //<![CDATA[
+                       $(function() {
+                               $('#benchmark').click(function() {
+                                       $('#benchmarkDetails').wcfDialog({
+                                               title: 'Log'
+                                       });
                                });
                        });
-               });
-               //]]>
-       </script>
-{/if}
+                       //]]>
+               </script>
+       {/if}
 </div>
\ No newline at end of file
index 2bea953c4ccb5211e57da4a554015f73c8f2b4c9..d790c9d7ba3f7f42208a4cc9a2b79a79eed0802b 100644 (file)
@@ -1,7 +1,7 @@
 <div class="benchmark">
-       <a id="benchmark">Execution time: {@$__wcf->getBenchmark()->getExecutionTime()}s ({#($__wcf->getBenchmark()->getExecutionTime()-$__wcf->getBenchmark()->getQueryExecutionTime())/$__wcf->getBenchmark()->getExecutionTime()*100}% PHP, {#$__wcf->getBenchmark()->getQueryExecutionTime()/$__wcf->getBenchmark()->getExecutionTime()*100}% SQL) | SQL queries: {#$__wcf->getBenchmark()->getQueryCount()} | Memory-Usage: {$__wcf->getBenchmark()->getMemoryUsage()}</a>
+       {if ENABLE_DEBUG_MODE}<a id="benchmark">{/if}Execution time: {@$__wcf->getBenchmark()->getExecutionTime()}s ({#($__wcf->getBenchmark()->getExecutionTime()-$__wcf->getBenchmark()->getQueryExecutionTime())/$__wcf->getBenchmark()->getExecutionTime()*100}% PHP, {#$__wcf->getBenchmark()->getQueryExecutionTime()/$__wcf->getBenchmark()->getExecutionTime()*100}% SQL) | SQL queries: {#$__wcf->getBenchmark()->getQueryCount()} | Memory-Usage: {$__wcf->getBenchmark()->getMemoryUsage()}{if ENABLE_DEBUG_MODE}</a>{/if}
        
-       {if ENABLE_DEBUG_MODE}  
+       {if ENABLE_DEBUG_MODE}
                <script data-relocate="true">
                        //<![CDATA[
                        $(function() {
                                <li id="benchmarkItem{@$benchmarkIndex}" style="margin-bottom: 8px;"{if $item.use >= 0.01} class="hot"{/if}>
                                        <span>{if $item.type == 1}(SQL Query) {/if}{$item.text}</span><br />
                                        <small style="font-size: .85em">Execution time: {@$item.use}s</small>
-                                       
-                                       <pre style="display: none">{foreach from=$item.trace key=traceNo item=traceItem}#{#$traceNo} {if !$traceItem.class|empty}{$traceItem.class}{$traceItem.type}{else}{if !$traceItem.file|empty}{$traceItem.file}: {/if}{/if}{$traceItem.function}() {if !$traceItem.line|empty}(line {#$traceItem.line}){/if} 
-       {/foreach}</pre>
-                                       
+                               
+                               <pre style="display: none">{foreach from=$item.trace key=traceNo item=traceItem}#{#$traceNo} {if !$traceItem.class|empty}{$traceItem.class}{$traceItem.type}{else}{if !$traceItem.file|empty}{$traceItem.file}: {/if}{/if}{$traceItem.function}() {if !$traceItem.line|empty}(line {#$traceItem.line}){/if} 
+{/foreach}</pre>
+                               
                                </li>
                        {/foreach}
                </ul>