mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-25 12:17:20 +02:00
Restore 'load' timer (#3635)
* Restore 'load' timer * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
a8b4bcdda8
commit
26c383d615
1 changed files with 4 additions and 0 deletions
|
@ -348,6 +348,7 @@ int TDB2::latest_id() {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const std::vector<Task> TDB2::all_tasks() {
|
const std::vector<Task> TDB2::all_tasks() {
|
||||||
|
Timer timer;
|
||||||
auto all_tctasks = replica()->all_task_data();
|
auto all_tctasks = replica()->all_task_data();
|
||||||
std::vector<Task> all;
|
std::vector<Task> all;
|
||||||
for (auto& maybe_tctask : all_tctasks) {
|
for (auto& maybe_tctask : all_tctasks) {
|
||||||
|
@ -357,12 +358,14 @@ const std::vector<Task> TDB2::all_tasks() {
|
||||||
|
|
||||||
dependency_scan(all);
|
dependency_scan(all);
|
||||||
|
|
||||||
|
Context::getContext().time_load_us += timer.total_us();
|
||||||
return all;
|
return all;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const std::vector<Task> TDB2::pending_tasks() {
|
const std::vector<Task> TDB2::pending_tasks() {
|
||||||
if (!_pending_tasks) {
|
if (!_pending_tasks) {
|
||||||
|
Timer timer;
|
||||||
auto& ws = working_set();
|
auto& ws = working_set();
|
||||||
auto largest_index = ws->largest_index();
|
auto largest_index = ws->largest_index();
|
||||||
|
|
||||||
|
@ -379,6 +382,7 @@ const std::vector<Task> TDB2::pending_tasks() {
|
||||||
|
|
||||||
dependency_scan(result);
|
dependency_scan(result);
|
||||||
|
|
||||||
|
Context::getContext().time_load_us += timer.total_us();
|
||||||
_pending_tasks = result;
|
_pending_tasks = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue