From f01d843fc856807403e8183ff0308a5f5af73a54 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sun, 29 Sep 2024 16:40:58 -0400 Subject: [PATCH 1/2] Restore 'load' timer --- src/TDB2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 5b93ad4ac..45e756e97 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -348,6 +348,7 @@ int TDB2::latest_id() { //////////////////////////////////////////////////////////////////////////////// const std::vector TDB2::all_tasks() { + Timer timer; auto all_tctasks = replica()->all_task_data(); std::vector all; for (auto& maybe_tctask : all_tctasks) { @@ -357,12 +358,14 @@ const std::vector TDB2::all_tasks() { dependency_scan(all); + Context::getContext ().time_load_us += timer.total_us (); return all; } //////////////////////////////////////////////////////////////////////////////// const std::vector TDB2::pending_tasks() { if (!_pending_tasks) { + Timer timer; auto& ws = working_set(); auto largest_index = ws->largest_index(); @@ -379,6 +382,7 @@ const std::vector TDB2::pending_tasks() { dependency_scan(result); + Context::getContext ().time_load_us += timer.total_us (); _pending_tasks = result; } From 75cd1b884b7c781ae6f69fa7a73492bd0fb23f0a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 29 Sep 2024 20:42:08 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/TDB2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 45e756e97..0e9375cee 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -358,7 +358,7 @@ const std::vector TDB2::all_tasks() { dependency_scan(all); - Context::getContext ().time_load_us += timer.total_us (); + Context::getContext().time_load_us += timer.total_us(); return all; } @@ -382,7 +382,7 @@ const std::vector TDB2::pending_tasks() { dependency_scan(result); - Context::getContext ().time_load_us += timer.total_us (); + Context::getContext().time_load_us += timer.total_us(); _pending_tasks = result; }