summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2019-12-31 20:06:30 -0500
committerFrank Ch. Eigler <fche@redhat.com>2019-12-31 20:06:30 -0500
commitb225b73266a068afa87ac06858c81688f0c00ea3 (patch)
treecddd6e525030d3206660d1919a682e326db47bd5 /tests
parent5de5dc7d1bf8b49056b123978f0449588d5f006c (diff)
downloadelfutils-fche/debuginfod-workq.tar.gz
debuginfod: rework threading model for file/archive scanningfche/debuginfod-workq
We switch from a thread per supplied PATH, with a semaphore based concurrency control, to a fixed number of worker threads collecting the result of a plain directory traversal being put into a work queue. This allows maximal continuous concurrency, even if the PATH directories are dramatically differently sized. There is no more need to use concurrency-motivated subdirectory wildcards for PATH entries: just a single top level directory will work fast. doc & tests incl.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rwxr-xr-xtests/run-debuginfod-find.sh8
2 files changed, 10 insertions, 2 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 02a8f75f..b087e60a 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2019-12-31 Frank Ch. Eigler <fche@redhat.com>
+
+ * run-debuginfod-find.sh: Adjust to new work-queue metrics.
+
2019-12-22 Frank Ch. Eigler <fche@redhat.com>
* debuginfod-debs/*: New test files, based on
diff --git a/tests/run-debuginfod-find.sh b/tests/run-debuginfod-find.sh
index 90dafe00..277e9719 100755
--- a/tests/run-debuginfod-find.sh
+++ b/tests/run-debuginfod-find.sh
@@ -115,7 +115,9 @@ mv prog F
mv prog.debug F
kill -USR1 $PID1
# Wait till both files are in the index.
-wait_ready $PORT1 'thread_work_total{file="F"}' 2
+wait_ready $PORT1 'thread_work_total{role="traverse"}' 2
+wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
+wait_ready $PORT1 'thread_busy{role="scan"}' 0
########################################################################
@@ -150,7 +152,9 @@ BUILDID2=`env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../src/readelf \
mv prog2 F
kill -USR1 $PID1
# Now there should be 3 files in the index
-wait_ready $PORT1 'thread_work_total{file="F"}' 3
+wait_ready $PORT1 'thread_work_total{role="traverse"}' 3
+wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
+wait_ready $PORT1 'thread_busy{role="scan"}' 0
# Rerun same tests for the prog2 binary
filename=`testrun ${abs_top_builddir}/debuginfod/debuginfod-find -v debuginfo $BUILDID2 2>vlog`