[lib/Fuzzer] guess the right number of workers if -jobs=N is given but -workers=M is not. Update the docs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany
2015-05-12 18:51:57 +00:00
parent 7fb69bc395
commit eaba2dd2f1
5 changed files with 22 additions and 7 deletions

View File

@ -61,4 +61,12 @@ void SetTimer(int Seconds) {
assert(Res == 0);
}
int NumberOfCpuCores() {
FILE *F = popen("nproc", "r");
int N = 0;
fscanf(F, "%d", &N);
fclose(F);
return N;
}
} // namespace fuzzer