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

@ -33,7 +33,6 @@
#include <Context.h>
#include <Duration.h>
#include <Task.h>
#include <Timer.h>
#include <text.h>
extern Context context;
@ -48,7 +47,7 @@ void sort_tasks (
std::vector <int>& order,
const std::string& keys)
{
Timer t ("Sort");
context.timer_sort.start ();
global_data = &data;
@ -59,6 +58,8 @@ void sort_tasks (
// Only sort if necessary.
if (order.size ())
std::stable_sort (order.begin (), order.end (), sort_compare);
context.timer_sort.stop ();
}
////////////////////////////////////////////////////////////////////////////////