[eluser]skattabrain[/eluser]
I'm trying to store the memory peak usage and the total script execution time using a post_system hook.
On each page load, I set a "page id" config variable...
Code:
$config['page_id'] = md5(uniqid(mt_rand()));
Then I do a post_controller_constructor hook to log the page view, then at the very end I want to set a post_system update to the tracking record for this page...
Code:
function update_trackme_times()
{
$data = array(
'track_total_memory' => memory_get_peak_usage()
);
$this->db->where('page_id', config_item('page_id'));
$this->db->update('page_track', $data);
}
Now it records the peak memory usage really well, but I can't seem to make use of the benchmarking class to get the equivalent of {elapsed time}
Any ideas?