Welcome Guest, Not a member yet? Register   Sign In
storing profiler data - specifically elapsed time
#1

[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?


Messages In This Thread
storing profiler data - specifically elapsed time - by El Forum - 02-25-2012, 10:09 AM
storing profiler data - specifically elapsed time - by El Forum - 02-25-2012, 10:30 AM
storing profiler data - specifically elapsed time - by El Forum - 02-25-2012, 10:59 AM
storing profiler data - specifically elapsed time - by El Forum - 02-25-2012, 12:22 PM
storing profiler data - specifically elapsed time - by El Forum - 02-25-2012, 01:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB