You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/10/13 19:08:16 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #6136: add query runner support for query file resampling

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org