From: SZEDER Gábor Date: Tue, 04 Dec 2018 17:37:21 GMT Subject: Re: [RFC PATCH 3/3] test-lib: add the '--stress' option to run a test repeatedly under load Message-ID: <20181204173721.GI30222@szeder.dev> In-Reply-To: <87o9a1z0j5.fsf@evledraar.gmail.com> On Tue, Dec 04, 2018 at 06:04:14PM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Tue, Dec 04 2018, SZEDER Gábor wrote: > > > The number of parallel invocations is determined by, in order of > > precedence: the number specified as '--stress=', or the value of > > the GIT_TEST_STRESS_LOAD environment variable, or twice the number of > > available processors in '/proc/cpuinfo', or 8. > > With this series we have at least 3 ways to get this number. First > online_cpus() in the C code, then Peff's recent `getconf > _NPROCESSORS_ONLN` in doc-diff, and now this /proc/cpuinfo parsing. > > Perhaps it makes sense to split online_cpus() into a helper to use from > the shellscripts instead? I don't think so, but I will update this patch to use 'getconf' instead.