Merge pull request #4235 from facebook/bench_nbThreads
benchmark mode specifies nb of threads with -v
This commit is contained in:
+11
-4
@@ -1312,7 +1312,8 @@ int main(int argCount, const char* argv[])
|
|||||||
nbWorkers = default_nbThreads();
|
nbWorkers = default_nbThreads();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DISPLAYLEVEL(4, "Compressing with %u worker threads \n", nbWorkers);
|
if (operation != zom_bench)
|
||||||
|
DISPLAYLEVEL(4, "Compressing with %u worker threads \n", nbWorkers);
|
||||||
#else
|
#else
|
||||||
(void)singleThread; (void)nbWorkers; (void)defaultLogicalCores;
|
(void)singleThread; (void)nbWorkers; (void)defaultLogicalCores;
|
||||||
#endif
|
#endif
|
||||||
@@ -1397,13 +1398,19 @@ int main(int argCount, const char* argv[])
|
|||||||
if (cLevel > ZSTD_maxCLevel()) cLevel = ZSTD_maxCLevel();
|
if (cLevel > ZSTD_maxCLevel()) cLevel = ZSTD_maxCLevel();
|
||||||
if (cLevelLast > ZSTD_maxCLevel()) cLevelLast = ZSTD_maxCLevel();
|
if (cLevelLast > ZSTD_maxCLevel()) cLevelLast = ZSTD_maxCLevel();
|
||||||
if (cLevelLast < cLevel) cLevelLast = cLevel;
|
if (cLevelLast < cLevel) cLevelLast = cLevel;
|
||||||
if (cLevelLast > cLevel)
|
DISPLAYLEVEL(3, "Benchmarking ");
|
||||||
DISPLAYLEVEL(3, "Benchmarking levels from %d to %d\n", cLevel, cLevelLast);
|
if (filenames->tableSize > 1)
|
||||||
|
DISPLAYLEVEL(3, "%u files ", (unsigned)filenames->tableSize);
|
||||||
|
if (cLevelLast > cLevel) {
|
||||||
|
DISPLAYLEVEL(3, "from level %d to %d ", cLevel, cLevelLast);
|
||||||
|
} else {
|
||||||
|
DISPLAYLEVEL(3, "at level %d ", cLevel);
|
||||||
|
}
|
||||||
|
DISPLAYLEVEL(3, "using %i threads \n", nbWorkers);
|
||||||
if (filenames->tableSize > 0) {
|
if (filenames->tableSize > 0) {
|
||||||
if(separateFiles) {
|
if(separateFiles) {
|
||||||
unsigned i;
|
unsigned i;
|
||||||
for(i = 0; i < filenames->tableSize; i++) {
|
for(i = 0; i < filenames->tableSize; i++) {
|
||||||
DISPLAYLEVEL(3, "Benchmarking %s \n", filenames->fileNames[i]);
|
|
||||||
operationResult = BMK_benchFilesAdvanced(&filenames->fileNames[i], 1, dictFileName, cLevel, cLevelLast, &compressionParams, g_displayLevel, &benchParams);
|
operationResult = BMK_benchFilesAdvanced(&filenames->fileNames[i], 1, dictFileName, cLevel, cLevelLast, &compressionParams, g_displayLevel, &benchParams);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user