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

[eluser]skattabrain[/eluser]
[quote author="CroNiX" date="1330197750"]You could use the benchmark class instance itself to do the time calculations.
Code:
function update_trackme_times()
{
  global $BM;  
  
  $data = array(
    'track_total_memory' => memory_get_peak_usage(),
    'track_elapsed_time' => $BM->elapsed_time('total_execution_time_start', 'total_execution_time_end')
  );

  $this->db->where('page_id', config_item('page_id'));
  $this->db->update('track', $data);
}
[/quote]

Thanks, that's exactly what I was looking for.


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