]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-process-util: run fewer getpid() tests
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 2 Apr 2021 09:44:48 +0000 (11:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 May 2021 11:59:23 +0000 (13:59 +0200)
commit07468a16e46dba9da8b9c8593e0c2ee5bfec3c69
treef71b2d551f8312b6a6003ad3a5bd9e556457e94e
parentdaceaabe1f87de85a404499d95c6f351b83fb3d9
test-process-util: run fewer getpid() tests

Significant time was spent in the getpid() measurement code, which is not very
important.  So let's optimize this a bit by running the slower version less
times, and only running both tests a lesser amount of times unless slow tests
are enabled.

This gives the better accuracy then before in slow mode, and still reasonable
accuracy in fast mode without a noticable slowdown.
src/test/test-process-util.c