summaryrefslogtreecommitdiffstats
path: root/tests/run-debuginfod-find.sh
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>2019-12-31 20:06:30 -0500
committerFrank Ch. Eigler <fche@redhat.com>2020-01-01 12:55:01 -0500
commitb39082297d5bdefc19baa74573f46566fd253c09 (patch)
tree4a248b99e22681b6eac44ae221fdc208feea39d4 /tests/run-debuginfod-find.sh
parent179596e560bae4e0ffd523ff466548afb0bfeb14 (diff)
debuginfod: rework threading model for file/archive scanning
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/run-debuginfod-find.sh')
-rwxr-xr-xtests/run-debuginfod-find.sh8
1 files changed, 6 insertions, 2 deletions
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`