mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Context: Eliminated commit timer
This commit is contained in:
parent
3f1c60cf37
commit
d39934e7b9
3 changed files with 6 additions and 7 deletions
|
@ -328,7 +328,7 @@ int Context::run ()
|
||||||
<< " load:" << static_cast <long> (timer_load.total_us ())
|
<< " load:" << static_cast <long> (timer_load.total_us ())
|
||||||
<< " gc:" << time_gc_us - tdb2.load_time_us
|
<< " gc:" << time_gc_us - tdb2.load_time_us
|
||||||
<< " filter:" << time_filter_us
|
<< " filter:" << time_filter_us
|
||||||
<< " commit:" << static_cast <long> (timer_commit.total_us ())
|
<< " commit:" << time_commit_us
|
||||||
<< " sort:" << static_cast <long> (timer_sort.total_us ())
|
<< " sort:" << static_cast <long> (timer_sort.total_us ())
|
||||||
<< " render:" << static_cast <long> (timer_render.total_us ())
|
<< " render:" << static_cast <long> (timer_render.total_us ())
|
||||||
<< " hooks:" << static_cast <long> (timer_hooks.total_us ())
|
<< " hooks:" << static_cast <long> (timer_hooks.total_us ())
|
||||||
|
@ -338,7 +338,7 @@ int Context::run ()
|
||||||
time_gc_us -
|
time_gc_us -
|
||||||
tdb2.load_time_us -
|
tdb2.load_time_us -
|
||||||
time_filter_us -
|
time_filter_us -
|
||||||
timer_commit.total_us () -
|
time_commit_us -
|
||||||
timer_sort.total_us () -
|
timer_sort.total_us () -
|
||||||
timer_render.total_us () -
|
timer_render.total_us () -
|
||||||
timer_hooks.total_us ())
|
timer_hooks.total_us ())
|
||||||
|
|
|
@ -103,7 +103,7 @@ public:
|
||||||
Timer timer_load;
|
Timer timer_load;
|
||||||
long time_gc_us {0};
|
long time_gc_us {0};
|
||||||
long time_filter_us {0};
|
long time_filter_us {0};
|
||||||
Timer timer_commit;
|
long time_commit_us {0};
|
||||||
Timer timer_sort;
|
Timer timer_sort;
|
||||||
Timer timer_render;
|
Timer timer_render;
|
||||||
Timer timer_hooks;
|
Timer timer_hooks;
|
||||||
|
|
|
@ -740,6 +740,8 @@ void TDB2::update (
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void TDB2::commit ()
|
void TDB2::commit ()
|
||||||
{
|
{
|
||||||
|
Timer timer;
|
||||||
|
|
||||||
// Ignore harmful signals.
|
// Ignore harmful signals.
|
||||||
signal (SIGHUP, SIG_IGN);
|
signal (SIGHUP, SIG_IGN);
|
||||||
signal (SIGINT, SIG_IGN);
|
signal (SIGINT, SIG_IGN);
|
||||||
|
@ -749,10 +751,7 @@ void TDB2::commit ()
|
||||||
signal (SIGUSR2, SIG_IGN);
|
signal (SIGUSR2, SIG_IGN);
|
||||||
|
|
||||||
dump ();
|
dump ();
|
||||||
context.timer_commit.start ();
|
|
||||||
|
|
||||||
gather_changes ();
|
gather_changes ();
|
||||||
|
|
||||||
pending.commit ();
|
pending.commit ();
|
||||||
completed.commit ();
|
completed.commit ();
|
||||||
undo.commit ();
|
undo.commit ();
|
||||||
|
@ -766,7 +765,7 @@ void TDB2::commit ()
|
||||||
signal (SIGUSR1, SIG_DFL);
|
signal (SIGUSR1, SIG_DFL);
|
||||||
signal (SIGUSR2, SIG_DFL);
|
signal (SIGUSR2, SIG_DFL);
|
||||||
|
|
||||||
context.timer_commit.stop ();
|
context.time_commit_us += timer.total_us ();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue