diff --git a/src/Context.cpp b/src/Context.cpp index 693c09a47..5ce959b8f 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -326,7 +326,7 @@ int Context::run () << " init:" << time_init_us << " load:" << static_cast (timer_load.total_us ()) - << " gc:" << static_cast (timer_gc.total_us () - tdb2.load_time_us) + << " gc:" << time_gc_us - tdb2.load_time_us << " filter:" << static_cast (timer_filter.total_us ()) << " commit:" << static_cast (timer_commit.total_us ()) << " sort:" << static_cast (timer_sort.total_us ()) @@ -335,7 +335,7 @@ int Context::run () << " other:" << static_cast (timer_total.total_us () - time_init_us - timer_load.total_us () - - timer_gc.total_us () - + time_gc_us - tdb2.load_time_us - timer_filter.total_us () - timer_commit.total_us () - diff --git a/src/Context.h b/src/Context.h index 208cede89..26b7d042c 100644 --- a/src/Context.h +++ b/src/Context.h @@ -101,7 +101,7 @@ public: Timer timer_total {}; long time_init_us {0}; Timer timer_load; - Timer timer_gc; + long time_gc_us {0}; Timer timer_filter; Timer timer_commit; Timer timer_sort; diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 34b085a2d..8b2f12fc9 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -1253,7 +1253,7 @@ void TDB2::show_diff ( // - waiting task in pending that needs to be un-waited void TDB2::gc () { - context.timer_gc.start (); + Timer timer; // Allowed as an override, but not recommended. if (context.config.getBoolean ("gc")) @@ -1290,7 +1290,7 @@ void TDB2::gc () completed.dependency_scan (); } - context.timer_gc.stop (); + context.time_gc_us += timer.total_us (); } ////////////////////////////////////////////////////////////////////////////////