Re: Add some metrics to debuginfod and use them to make test sleep less
Hi, On Sun, Nov 24, 2019 at 08:58:13PM +0100, Mark Wielaard wrote: > The following two patches add some metrics to debuginfod that can be > used ito see whether the scanners are still finding new executables, > debuginfo files or find new sources. They can also be used in the > run-debuginfod-find.sh testcase to see whether the server is ready > or not for the next test. This removes most sleeps from the testcase > (and the test_webapi_sleep in the server). > > [1/2] debuginfod: Add found_{executable,debuginfo,sourcerefs}_total metrics. > [2/2] tests: Don't sleep in run-debuginfod-find.sh, but wait till ready. > > This brings down the run-debuginfod-find.sh run from 2 minutes and 10 > seconds to 8 seconds on my machine. And from 3 minutes to 45 seconds > under valgrind After (a very short) discussion on irc I pushed this to master. I did change the sleep 1 to a sleep 0.5 (and doubled the timeout value to compensate). This makes the test finish a couple of seconds sooner. > It doesn't actually test that the metrics are correctly set (even > though it calculates what the metrics should be) because the metrics > are not guaranteed to be stable. But maybe the test should? > It could just fail instead of timeing out. Then when we change the > metrics we could just update the test simultaniously? I tweaked it so that it fails immediately when at timeout the metric hasn't changed to the expected value. It seems better to fail fast because the next test will most likely fail anyway. Cheers, Mark
[patch pushed] debuginfod: Tweak groom cycle for memory freeing
Hi - After an irresistible sales job on irc, pushed to master: diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index a1d17b5f9a23..f37c85302886 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,8 @@ +2019-11-25 Frank Ch. Eigler + + * debuginfod.cxx (groom): Add a sqlite3_db_release_memory() + at the end of periodic grooming to try to shrink the process. + 2019-11-24 Mark Wielaard * debuginfod.cxx (test_webapi_sleep): Removed. diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index cb0e1f3bf0a4..aa7ffcf662aa 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -2357,6 +2357,8 @@ void groom() database_stats_report(); + sqlite3_db_release_memory(db); // shrink the process if possible + gettimeofday (&tv_end, NULL); double deltas = (tv_end.tv_sec - tv_start.tv_sec) + (tv_end.tv_usec - tv_start.tv_usec)*0.01;
[COMMITTED] elfutils.spec: Add BuildRequires: curl
As the buildbot just pointed out... The run-debuginfod-find.sh now relies on curl to fetch the metrics. Signed-off-by: Mark Wielaard --- config/ChangeLog| 4 config/elfutils.spec.in | 1 + 2 files changed, 5 insertions(+) diff --git a/config/ChangeLog b/config/ChangeLog index 73643f91..ff004d6e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2019-11-25 Mark Wielaard + + * elfutils.spec.in: Add BuildRequires curl. + 2019-10-28 Frank Ch. Eigler * eu.am (AM_CXXFLAGS): Clone & amend AM_CFLAGS for c++11 code. diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index 3cd15ce3..f244f363 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -42,6 +42,7 @@ BuildRequires: pkgconfig(sqlite3) >= 3.7.17 BuildRequires: pkgconfig(libarchive) >= 3.1.2 # for the run-debuginfod-find.sh test case in %check for /usr/sbin/ss BuildRequires: iproute +BuildRequires: curl %define _gnu %{nil} %define _programprefix eu- -- 2.20.1
[Bug tools/23787] eu-size: Bad handling of ar files inside are files
https://sourceware.org/bugzilla/show_bug.cgi?id=23787 My Grandy changed: What|Removed |Added CC||bloonstowerdefense5.io@gmai ||l.com --- Comment #6 from My Grandy --- Thanks for all the tips mentioned in this article! it's always good to read things you have heard before and are implementing, but from a different perspective, always pick up some extra bits of information. https://bubble-shooter.co -- You are receiving this mail because: You are on the CC list for the bug.
[Bug tools/23787] eu-size: Bad handling of ar files inside are files
https://sourceware.org/bugzilla/show_bug.cgi?id=23787 --- Comment #7 from My Grandy --- Thanks for all the tips mentioned in this article! it's always good to read things you have heard before and are implementing, but from a different perspective, always pick up some extra bits of information. https://bubble-shooter.co -- You are receiving this mail because: You are on the CC list for the bug.