The web based syslog https://lggr.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
775B

  1. <?php
  2. class LggrPerf {
  3. private $tsStart = null;
  4. private $tsEnd = null;
  5. private $tsLen = null;
  6. private $sQuery = null;
  7. function __construct() {}
  8. // constructor
  9. public function start($sql) {
  10. $this->sQuery = $sql;
  11. $this->tsStart = microtime(true);
  12. }
  13. // function
  14. public function stop() {
  15. $this->tsEnd = microtime(true);
  16. $this->tsLen = $this->tsEnd - $this->tsStart;
  17. }
  18. // function
  19. public function getPerf() {
  20. $a = array();
  21. $a['time'] = $this->tsLen;
  22. $a['query'] = $this->sQuery;
  23. $this->logperf();
  24. return $a;
  25. }
  26. // function
  27. private function logPerf() {} // function
  28. }
Social stuff:
Mastodon