profile-callstack.php 781 B

123456789101112131415161718192021222324252627282930
  1. <!-- start profiling callstack -->
  2. <table class="yiiLog" width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
  3. <tr>
  4. <th style="background:black;color:white;" colspan="2">
  5. Profilová zpráva zásobníka
  6. </th>
  7. </tr>
  8. <tr style="background-color: #ccc;">
  9. <th>Funkcia</th>
  10. <th>Čas (s)</th>
  11. </tr>
  12. <?php
  13. foreach($data as $index=>$entry)
  14. {
  15. $color=($index%2)?'#F5F5F5':'#FFFFFF';
  16. list($proc,$time,$level)=$entry;
  17. $proc=CHtml::encode($proc);
  18. $time=sprintf('%0.5f',$time);
  19. $spaces=str_repeat('&nbsp;',$level*8);
  20. echo <<<EOD
  21. <tr style="background:{$color}">
  22. <td>{$spaces}{$proc}</td>
  23. <td align="center">{$time}</td>
  24. </tr>
  25. EOD;
  26. }
  27. ?>
  28. </table>
  29. <!-- end of profiling callstack -->