Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
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.
 
 
 
 
 
 

21 lines
543 B

<?php
function microtime_float()
{
return microtime(true);
}
function tick_event() {
$db_info=debug_backtrace();
$db_info=$db_info[1];
$function=$db_info['function'];
$file=$db_info['file'];
$line=$db_info['line'];
$class=$db_info['class'];
//save results
q("INSERT INTO `profiling` (`function`, `file`, `line`, `class`, `time`) VALUES ('%s', '%s', '%d', '%s', '%f'); ",
dbesc($function), dbesc($file), intval($line), dbesc($class), microtime_float()*1000);
}
register_tick_function('tick_event');
declare(ticks=50);