From bc9481618467b912ef91634a1c4fa8b71f2dea7a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 2 Apr 2013 23:45:34 -0400 Subject: [PATCH] Performance - Removed Context::timer_sync, as it makes no sense now that sync is not an automatic operation like gc. --- src/Context.cpp | 2 -- src/Context.h | 1 - src/commands/CmdSync.cpp | 16 ++++++++++++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 4671972a5..99e86933b 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -276,7 +276,6 @@ int Context::run () << " init:" << timer_init.total () << " load:" << timer_load.total () - << " synch:" << timer_sync.total () << " gc:" << timer_gc.total () << " filter:" << timer_filter.total () << " commit:" << timer_commit.total () @@ -284,7 +283,6 @@ int Context::run () << " render:" << timer_render.total () << " total:" << (timer_init.total () + timer_load.total () + - timer_sync.total () + timer_gc.total () + timer_filter.total () + timer_commit.total () + diff --git a/src/Context.h b/src/Context.h index 49cddca45..55b78b028 100644 --- a/src/Context.h +++ b/src/Context.h @@ -117,7 +117,6 @@ public: Timer timer_init; Timer timer_load; - Timer timer_sync; Timer timer_gc; Timer timer_filter; Timer timer_commit; diff --git a/src/commands/CmdSync.cpp b/src/commands/CmdSync.cpp index fad7de479..9f45c22fd 100644 --- a/src/commands/CmdSync.cpp +++ b/src/commands/CmdSync.cpp @@ -53,7 +53,8 @@ CmdSync::CmdSync () int CmdSync::execute (std::string& output) { int status = 0; - context.timer_sync.start (); + Timer timer_sync; + timer_sync.start (); std::stringstream out; @@ -233,7 +234,18 @@ int CmdSync::execute (std::string& output) out << "\n"; output = out.str (); - context.timer_sync.stop (); + +/* + timer_sync.stop (); + std::stringstream s; + s << "Sync " + << Date ().toISO () + << " sync:" + << timer_sync.total () + << "\n"; + debug (s.str ()); +*/ + return status; }