Skip to content

Commit

Permalink
[core] limit number of client threads based on op count. (brianfrankc…
Browse files Browse the repository at this point in the history
  • Loading branch information
adally authored and busbey committed Sep 7, 2019
1 parent d1ad3ec commit 2ff658c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/main/java/com/yahoo/ycsb/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,10 @@ private static List<ClientThread> initDb(String dbname, Properties props, int th
opcount = Integer.parseInt(props.getProperty(RECORD_COUNT_PROPERTY, DEFAULT_RECORD_COUNT));
}
}

if (threadcount > opcount){
threadcount = opcount;
System.out.println("Warning: the threadcount is bigger than recordcount, the threadcount will be recordcount!");
}
for (int threadid = 0; threadid < threadcount; threadid++) {
DB db;
try {
Expand Down

0 comments on commit 2ff658c

Please sign in to comment.