mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Context: Eliminated render timer
This commit is contained in:
parent
473eaec923
commit
e906b20014
4 changed files with 18 additions and 18 deletions
|
@ -330,7 +330,7 @@ int Context::run ()
|
|||
<< " filter:" << time_filter_us
|
||||
<< " commit:" << time_commit_us
|
||||
<< " sort:" << time_sort_us
|
||||
<< " render:" << static_cast <long> (timer_render.total_us ())
|
||||
<< " render:" << time_render_us
|
||||
<< " hooks:" << time_hooks_us
|
||||
<< " other:" << static_cast <long> (timer_total.total_us () -
|
||||
time_init_us -
|
||||
|
@ -340,7 +340,7 @@ int Context::run ()
|
|||
time_filter_us -
|
||||
time_commit_us -
|
||||
time_sort_us -
|
||||
timer_render.total_us () -
|
||||
time_render_us -
|
||||
time_hooks_us)
|
||||
<< " total:" << static_cast <long> (timer_total.total_us ())
|
||||
<< '\n';
|
||||
|
|
|
@ -105,7 +105,7 @@ public:
|
|||
long time_filter_us {0};
|
||||
long time_commit_us {0};
|
||||
long time_sort_us {0};
|
||||
Timer timer_render;
|
||||
long time_render_us {0};
|
||||
long time_hooks_us {0};
|
||||
};
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ ViewTask::~ViewTask ()
|
|||
//
|
||||
std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& sequence)
|
||||
{
|
||||
context.timer_render.start ();
|
||||
Timer timer;
|
||||
|
||||
bool const obfuscate = context.config.getBoolean ("obfuscate");
|
||||
bool const print_empty_columns = context.config.getBoolean ("print.empty.columns");
|
||||
|
@ -287,7 +287,7 @@ 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 ();
|
||||
context.time_render_us += timer.total_us ();
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ 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 ();
|
||||
context.time_render_us += timer.total_us ();
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
@ -383,12 +383,12 @@ std::string ViewTask::render (std::vector <Task>& data, std::vector <int>& seque
|
|||
// Stop if the row limit is exceeded.
|
||||
if (++_rows >= _truncate_rows && _truncate_rows != 0)
|
||||
{
|
||||
context.timer_render.stop ();
|
||||
context.time_render_us += timer.total_us ();
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
context.timer_render.stop ();
|
||||
context.time_render_us += timer.total_us ();
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ int CmdExport::execute (std::string& output)
|
|||
filter.subset (filtered);
|
||||
|
||||
// Export == render.
|
||||
context.timer_render.start ();
|
||||
Timer timer;
|
||||
|
||||
// Obey 'limit:N'.
|
||||
int rows = 0;
|
||||
|
@ -101,7 +101,7 @@ int CmdExport::execute (std::string& output)
|
|||
if (json_array)
|
||||
output += "]\n";
|
||||
|
||||
context.timer_render.stop ();
|
||||
context.time_render_us += timer.total_us ();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue