From 8af6d70685f16d9f37307bc8f2e7cc957ed1a6fd Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 14 Aug 2011 21:02:30 -0400 Subject: [PATCH] TDB2 - Timing - Added timing information to TDB2 for performance measuring. --- src/TDB2.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TDB2.cpp b/src/TDB2.cpp index dabc0f88f..d9c2942c8 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -27,6 +27,7 @@ //#include // TODO Remove. #include +#include #include #include @@ -61,6 +62,7 @@ void TF2::target (const std::string& f) const std::vector & TF2::get_tasks () { // std::cout << "# TF2::get_tasks " << _file.data << "\n"; + Timer timer ("TF2::get_tasks " + _file.data); if (! _loaded_tasks) load_tasks (); @@ -411,7 +413,7 @@ void TDB2::modify (const Task& task) void TDB2::commit () { dump (); -// std::cout << "# TDB2::commit\n"; + Timer timer ("TDB2::commit"); pending.commit (); completed.commit (); undo.commit (); @@ -427,7 +429,7 @@ void TDB2::commit () // Now cleans up dangling dependencies. int TDB2::gc () { -// std::cout << "# TDB2::gc\n"; + Timer timer ("TDB2::gc"); /* pending.load_tasks completed.load_tasks