Performance Timing

- Change the was performance measurements are taken.  This in preparation
  to automated daily perf charts, leading to efforts to speed up certain
  operations.
This commit is contained in:
Paul Beckingham 2011-08-15 21:53:01 -04:00
parent ad38d5b92e
commit ac9d1f3bfa
11 changed files with 182 additions and 53 deletions

View file

@ -101,7 +101,7 @@ ViewTask::ViewTask ()
//
std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& sequence)
{
Timer timer ("ViewTask::render");
context.timer_render.start ();
// Determine minimal, ideal column widths.
std::vector <int> minimal;
@ -228,7 +228,10 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
// Stop if the line limit is exceeded.
if (++_lines >= _truncate_lines && _truncate_lines != 0)
{
context.timer_render.stop ();
return out;
}
}
// Compose, render columns, in sequence.
@ -289,16 +292,23 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
// Stop if the line limit is exceeded.
if (++_lines >= _truncate_lines && _truncate_lines != 0)
{
context.timer_render.stop ();
return out;
}
}
cells.clear ();
// Stop if the row limit is exceeded.
if (++_rows >= _truncate_rows && _truncate_rows != 0)
{
context.timer_render.stop ();
return out;
}
}
context.timer_render.stop ();
return out;
}