profile-callstack-firebug.php 421 B

1234567891011121314151617
  1. <script type="text/javascript">
  2. /*<![CDATA[*/
  3. if(typeof(console)=='object') {
  4. console.group("Profiling Callstack Rapport");
  5. <?php
  6. foreach($data as $index=>$entry) {
  7. list($proc,$time,$level)=$entry;
  8. $proc=CJavaScript::quote($proc);
  9. $time=sprintf('%0.5f',$time);
  10. $spaces=str_repeat(' ',$level*8);
  11. echo "\tconsole.log(\"[$time]{$spaces}{$proc}\");\n";
  12. }
  13. ?>
  14. console.groupEnd();
  15. }
  16. /*]]>*/
  17. </script>