Jackie-Jiang commented on a change in pull request #6136:
URL: https://github.com/apache/incubator-pinot/pull/6136#discussion_r504190523
##########
File path:
pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java
##########
@@ -622,6 +632,22 @@ public static void
increasingQPSQueryRunner(PerfBenchmarkDriverConf conf, String
}
}
+ private static Stream<String> makeQueries(List<String> inputs, QueryMode
queryMode, int queryCount) {
+ queryCount = queryCount > 0 ? queryCount : inputs.size();
+
+ switch (queryMode) {
+ case LIST:
+ return inputs.stream().limit(queryCount);
+
+ case SAMPLE:
+ Random r = new Random(inputs.hashCode()); // anything deterministic
will do
Review comment:
This hashCode could be quite expensive, maybe just use `new Random(0)`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]