Skip to content

Commit

Permalink
Merge pull request #12 from roydahan/improve-auto
Browse files Browse the repository at this point in the history
improve(runMulti): Improve threadCount steps to find max throughput
  • Loading branch information
CodeLieutenant authored Aug 21, 2024
2 parents 827b728 + b2d4544 commit 9d0609e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,12 @@ private boolean runMulti(boolean auto, UniformRateLimiter rateLimiter)

runIds.add(threadCount + " threadCount");
prevThreadCount = threadCount;
if (threadCount < 16)
threadCount *= 2;
if (threadCount < 500)
threadCount += 100;
else if (threadCount < 1500)
threadCount *= 1.2;
else
threadCount *= 1.5;
threadCount *= 1.1;

if (!results.isEmpty() && threadCount > settings.rate.maxThreads)
break;
Expand Down

0 comments on commit 9d0609e

Please sign in to comment.