Skip to content

Commit

Permalink
Restore 'load' timer (GothenburgBitFactory#3635)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
djmitche and pre-commit-ci[bot] authored Oct 10, 2024
1 parent a8b4bcd commit 26c383d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TDB2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ int TDB2::latest_id() {

////////////////////////////////////////////////////////////////////////////////
const std::vector<Task> TDB2::all_tasks() {
Timer timer;
auto all_tctasks = replica()->all_task_data();
std::vector<Task> all;
for (auto& maybe_tctask : all_tctasks) {
Expand All @@ -357,12 +358,14 @@ const std::vector<Task> TDB2::all_tasks() {

dependency_scan(all);

Context::getContext().time_load_us += timer.total_us();
return all;
}

////////////////////////////////////////////////////////////////////////////////
const std::vector<Task> TDB2::pending_tasks() {
if (!_pending_tasks) {
Timer timer;
auto& ws = working_set();
auto largest_index = ws->largest_index();

Expand All @@ -379,6 +382,7 @@ const std::vector<Task> TDB2::pending_tasks() {

dependency_scan(result);

Context::getContext().time_load_us += timer.total_us();
_pending_tasks = result;
}

Expand Down

0 comments on commit 26c383d

Please sign in to comment.