TraceHeader.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * TraceHeader is a simple holder class for NetDebug::trace headers
  4. *
  5. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  6. * @copyright (c) 2003 amfphp.org
  7. * @package flashservices
  8. * @author Justin Watkins
  9. * @version $Id: TraceHeader.php,v 1.3 2005/07/05 07:40:51 pmineault Exp $
  10. * @subpackage debug
  11. */
  12. class TraceHeader {
  13. function TraceHeader($traceStack) {
  14. $this->EventType = "trace";
  15. $this->Time = time();
  16. $this->Source = "Server";
  17. $this->Date = array(date("D M j G:i:s T O Y"));
  18. $this->messages = $traceStack;
  19. }
  20. }
  21. class ProfilingHeader {
  22. function ProfilingHeader() {
  23. global $amfphp;
  24. $this->EventType = "profiling";
  25. $this->includeTime = (int) ($amfphp['includeTime']*1000);
  26. $this->decodeTime = (int) ($amfphp['decodeTime']*1000);
  27. $this->callTime = (int) ($amfphp['callTime']*1000);
  28. $this->totalTime = -268435457;
  29. $this->frameworkTime = ((int) ($amfphp['totalTime']*1000))
  30. - $this->includeTime
  31. - $this->decodeTime
  32. - $this->callTime;
  33. }
  34. }
  35. ?>