forked from tmaiaroto/li3_perf
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coloring some things. format changes. adding variable byte size calcu…
…lation for shits and giggles. it is not super accurate, but may be of use.
- Loading branch information
Showing
3 changed files
with
121 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
|
||
<?php | ||
$total_vars = count($vars['view']); | ||
$request_size = $this->li3perf->byteSize($this->li3perf->varSize($vars['request']), array('k' => 'Kb', 'm' => 'Mb', 'g' => 'Gb')); | ||
$variable_size = $this->li3perf->byteSize($this->li3perf->varSize($vars['view']), array('k' => 'Kb', 'm' => 'Mb', 'g' => 'Gb')); | ||
?> | ||
<h2>Request Params</h2> | ||
<?=$this->li3perf->printVars($vars['request']); ?> | ||
|
||
<h2>View Template Variables [<?=count($vars['view']); ?>]</h2> | ||
<?=$this->li3perf->printVars($vars['view']); ?> | ||
<h2>View Template Variables</h2> | ||
<p>There <?php echo ($total_vars == 1) ? 'is':'are'; ?> <span class="li3-perf-stat-value"><?=$total_vars; ?></span> variable<?php echo ($total_vars == 1) ? '':'s'; ?> occupying about <span class="li3-perf-stat-value"><?=$variable_size; ?></span> in memory.</p> | ||
<?php | ||
foreach($vars['view'] as $k => $v) { | ||
echo '<span class="li3-perf-stat-value">$' . $k . '</span><br />'; | ||
echo $this->li3perf->printVars($v); | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters