mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
TDB2 - Timing
- Added timing information to TDB2 for performance measuring.
This commit is contained in:
parent
49cabc1bfd
commit
8af6d70685
1 changed files with 4 additions and 2 deletions
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
//#include <iostream> // TODO Remove.
|
//#include <iostream> // TODO Remove.
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
|
#include <Timer.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
#include <TDB2.h>
|
#include <TDB2.h>
|
||||||
|
|
||||||
|
@ -61,6 +62,7 @@ void TF2::target (const std::string& f)
|
||||||
const std::vector <Task>& TF2::get_tasks ()
|
const std::vector <Task>& TF2::get_tasks ()
|
||||||
{
|
{
|
||||||
// std::cout << "# TF2::get_tasks " << _file.data << "\n";
|
// std::cout << "# TF2::get_tasks " << _file.data << "\n";
|
||||||
|
Timer timer ("TF2::get_tasks " + _file.data);
|
||||||
|
|
||||||
if (! _loaded_tasks)
|
if (! _loaded_tasks)
|
||||||
load_tasks ();
|
load_tasks ();
|
||||||
|
@ -411,7 +413,7 @@ void TDB2::modify (const Task& task)
|
||||||
void TDB2::commit ()
|
void TDB2::commit ()
|
||||||
{
|
{
|
||||||
dump ();
|
dump ();
|
||||||
// std::cout << "# TDB2::commit\n";
|
Timer timer ("TDB2::commit");
|
||||||
pending.commit ();
|
pending.commit ();
|
||||||
completed.commit ();
|
completed.commit ();
|
||||||
undo.commit ();
|
undo.commit ();
|
||||||
|
@ -427,7 +429,7 @@ void TDB2::commit ()
|
||||||
// Now cleans up dangling dependencies.
|
// Now cleans up dangling dependencies.
|
||||||
int TDB2::gc ()
|
int TDB2::gc ()
|
||||||
{
|
{
|
||||||
// std::cout << "# TDB2::gc\n";
|
Timer timer ("TDB2::gc");
|
||||||
/*
|
/*
|
||||||
pending.load_tasks
|
pending.load_tasks
|
||||||
completed.load_tasks
|
completed.load_tasks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue