]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
PR25394 cont'd: debuginfod timing fix for fts-traversal thread
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 20 Jan 2020 20:37:33 +0000 (15:37 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 20 Jan 2020 20:38:50 +0000 (15:38 -0500)
The new code neglected to set the last_rescan timestamp, leading
to overly frequent rescanning.

debuginfod/debuginfod.cxx

index b0299a1331303cfa421a9f8d7f93c70ee90fc597..053727642caa3d45b3b3afacefda995645ff4b3c 100644 (file)
@@ -2505,6 +2505,7 @@ thread_main_fts_source_paths (void* arg)
           {
             set_metric("thread_busy", "role","traverse", 1);
             scan_source_paths();
+            last_rescan = time(NULL); // NB: now was before scanning
             inc_metric("thread_work_total", "role","traverse");
             set_metric("thread_busy", "role","traverse", 0);
           }