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

Reply via email to