Skip to content

Commit

Permalink
bench: nb threads specified with -v
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyan4973 committed Jan 12, 2025
1 parent a610550 commit 8c8fc18
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions programs/zstdcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,8 @@ int main(int argCount, const char* argv[])
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
(void)singleThread; (void)nbWorkers; (void)defaultLogicalCores;
#endif
Expand Down Expand Up @@ -1397,13 +1398,17 @@ int main(int argCount, const char* argv[])
if (cLevel > ZSTD_maxCLevel()) cLevel = ZSTD_maxCLevel();
if (cLevelLast > ZSTD_maxCLevel()) cLevelLast = ZSTD_maxCLevel();
if (cLevelLast < cLevel) cLevelLast = cLevel;
if (cLevelLast > cLevel)
DISPLAYLEVEL(3, "Benchmarking levels from %d to %d\n", cLevel, cLevelLast);
DISPLAYLEVEL(3, "Benchmarking ");
if (cLevelLast > cLevel) {
DISPLAYLEVEL(3, "levels from %d to %d ", cLevel, cLevelLast);
} else {
DISPLAYLEVEL(3, "level %d ", cLevel);
}
DISPLAYLEVEL(3, "using %i threads \n", nbWorkers);
if (filenames->tableSize > 0) {
if(separateFiles) {
unsigned 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);
}
} else {
Expand Down

0 comments on commit 8c8fc18

Please sign in to comment.