Skip to content

Commit

Permalink
[core] make it possible to use zero operation count again. (brianfran…
Browse files Browse the repository at this point in the history
…kcooper#1382)

Previously, if you defined maxexecutiontime and not defined operationcount
parameter (or set operationcount=0), then you were able to run YCSB for a
given period of time and measure the number of operations you get during
the load test.

Since brianfrankcooper#1323 was merged, it it not possible to use operationcount=0, as
the thread count will be set to 0 in this case and no client thread will
be created. This PR makes it possible to use operationcount=0 again.
  • Loading branch information
symat authored and Mate Szalay-Beko committed Jan 8, 2020
1 parent 26f1668 commit ee08e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/site/ycsb/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ 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){
if (threadcount > opcount && opcount > 0){
threadcount = opcount;
System.out.println("Warning: the threadcount is bigger than recordcount, the threadcount will be recordcount!");
}
Expand Down

0 comments on commit ee08e60

Please sign in to comment.