mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Context: Eliminated sort timer
This commit is contained in:
parent
d39934e7b9
commit
88512e25cb
3 changed files with 5 additions and 5 deletions
|
@ -329,7 +329,7 @@ int Context::run ()
|
||||||
<< " gc:" << time_gc_us - tdb2.load_time_us
|
<< " gc:" << time_gc_us - tdb2.load_time_us
|
||||||
<< " filter:" << time_filter_us
|
<< " filter:" << time_filter_us
|
||||||
<< " commit:" << time_commit_us
|
<< " commit:" << time_commit_us
|
||||||
<< " sort:" << static_cast <long> (timer_sort.total_us ())
|
<< " sort:" << time_sort_us
|
||||||
<< " render:" << static_cast <long> (timer_render.total_us ())
|
<< " render:" << static_cast <long> (timer_render.total_us ())
|
||||||
<< " hooks:" << static_cast <long> (timer_hooks.total_us ())
|
<< " hooks:" << static_cast <long> (timer_hooks.total_us ())
|
||||||
<< " other:" << static_cast <long> (timer_total.total_us () -
|
<< " other:" << static_cast <long> (timer_total.total_us () -
|
||||||
|
@ -339,7 +339,7 @@ int Context::run ()
|
||||||
tdb2.load_time_us -
|
tdb2.load_time_us -
|
||||||
time_filter_us -
|
time_filter_us -
|
||||||
time_commit_us -
|
time_commit_us -
|
||||||
timer_sort.total_us () -
|
time_sort_us -
|
||||||
timer_render.total_us () -
|
timer_render.total_us () -
|
||||||
timer_hooks.total_us ())
|
timer_hooks.total_us ())
|
||||||
<< " total:" << static_cast <long> (timer_total.total_us ())
|
<< " total:" << static_cast <long> (timer_total.total_us ())
|
||||||
|
|
|
@ -104,7 +104,7 @@ public:
|
||||||
long time_gc_us {0};
|
long time_gc_us {0};
|
||||||
long time_filter_us {0};
|
long time_filter_us {0};
|
||||||
long time_commit_us {0};
|
long time_commit_us {0};
|
||||||
Timer timer_sort;
|
long time_sort_us {0};
|
||||||
Timer timer_render;
|
Timer timer_render;
|
||||||
Timer timer_hooks;
|
Timer timer_hooks;
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,7 +47,7 @@ void sort_tasks (
|
||||||
std::vector <int>& order,
|
std::vector <int>& order,
|
||||||
const std::string& keys)
|
const std::string& keys)
|
||||||
{
|
{
|
||||||
context.timer_sort.start ();
|
Timer timer;
|
||||||
|
|
||||||
global_data = &data;
|
global_data = &data;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ void sort_tasks (
|
||||||
if (order.size ())
|
if (order.size ())
|
||||||
std::stable_sort (order.begin (), order.end (), sort_compare);
|
std::stable_sort (order.begin (), order.end (), sort_compare);
|
||||||
|
|
||||||
context.timer_sort.stop ();
|
context.time_sort_us += timer.total_us ();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue