diff --git a/src/Context.cpp b/src/Context.cpp index e7d7968cd..3ac308fb0 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -329,7 +329,7 @@ int Context::run () << " gc:" << time_gc_us - tdb2.load_time_us << " filter:" << time_filter_us << " commit:" << time_commit_us - << " sort:" << static_cast (timer_sort.total_us ()) + << " sort:" << time_sort_us << " render:" << static_cast (timer_render.total_us ()) << " hooks:" << static_cast (timer_hooks.total_us ()) << " other:" << static_cast (timer_total.total_us () - @@ -339,7 +339,7 @@ int Context::run () tdb2.load_time_us - time_filter_us - time_commit_us - - timer_sort.total_us () - + time_sort_us - timer_render.total_us () - timer_hooks.total_us ()) << " total:" << static_cast (timer_total.total_us ()) diff --git a/src/Context.h b/src/Context.h index fd636fb46..c3947900f 100644 --- a/src/Context.h +++ b/src/Context.h @@ -104,7 +104,7 @@ public: long time_gc_us {0}; long time_filter_us {0}; long time_commit_us {0}; - Timer timer_sort; + long time_sort_us {0}; Timer timer_render; Timer timer_hooks; }; diff --git a/src/sort.cpp b/src/sort.cpp index 86c3dbb5d..58c3e5cc9 100644 --- a/src/sort.cpp +++ b/src/sort.cpp @@ -47,7 +47,7 @@ void sort_tasks ( std::vector & order, const std::string& keys) { - context.timer_sort.start (); + Timer timer; global_data = &data; @@ -59,7 +59,7 @@ void sort_tasks ( if (order.size ()) std::stable_sort (order.begin (), order.end (), sort_compare); - context.timer_sort.stop (); + context.time_sort_us += timer.total_us (); } ////////////////////////////////////////////////////////////////////////////////