apucher commented on a change in pull request #6885: URL: https://github.com/apache/incubator-pinot/pull/6885#discussion_r627828614
########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java ########## @@ -830,6 +841,55 @@ public void clear() { } } + public static class QuerySummary { + private long _timePassed; + private int _numQueriesExecuted; + private int _numExceptions; + private double _avgQps; + private double _avgBrokerTime; + private double _avgClientTime; + private List<Statistics> _statisticsList; Review comment: might as well `final` these ########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java ########## @@ -608,13 +618,11 @@ public static void increasingQPSQueryRunner(PerfBenchmarkDriverConf conf, List<S long queryIntervalNanos = (long) (1E9 / currentQPS); while (numTimesToRunQueries == 0 || numTimesExecuted < numTimesToRunQueries) { if (executorService.isTerminated()) { - LOGGER.error("All threads got exception and already dead."); - return; + throw new IllegalThreadStateException("All threads got exception and already dead."); } if (timeout > 0 && System.currentTimeMillis() - startTimeAbsolute > timeout) { - LOGGER.warn("Timeout of {} sec reached. Aborting", timeout); - return; + throw new TimeoutException("Timeout of " + timeout + " sec reached. Aborting"); Review comment: same here ########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java ########## @@ -375,13 +382,11 @@ public static void multiThreadedQueryRunner(PerfBenchmarkDriverConf conf, List<S int numTimesExecuted = 0; while (numTimesToRunQueries == 0 || numTimesExecuted < numTimesToRunQueries) { if (executorService.isTerminated()) { - LOGGER.error("All threads got exception and already dead."); - return; + throw new IllegalThreadStateException("All threads got exception and already dead."); } if (timeout > 0 && System.currentTimeMillis() - startTimeAbsolute > timeout) { - LOGGER.warn("Timeout of {} sec reached. Aborting", timeout); - return; + throw new TimeoutException("Timeout of " + timeout + " sec reached. Aborting"); Review comment: same ########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java ########## @@ -275,7 +277,7 @@ public static void singleThreadedQueryRunner(PerfBenchmarkDriverConf conf, List< for (String query : queries) { if (timeout > 0 && System.currentTimeMillis() - startTimeAbsolute > timeout) { LOGGER.warn("Timeout of {} sec reached. Aborting", timeout); - return; + throw new TimeoutException("Timeout of " + timeout + " sec reached. Aborting"); Review comment: the intended behavior here may be to simply run as many requests as possible and then stopping. just a thought ########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java ########## @@ -484,13 +493,11 @@ public static void targetQPSQueryRunner(PerfBenchmarkDriverConf conf, List<Strin int numTimesExecuted = 0; while (numTimesToRunQueries == 0 || numTimesExecuted < numTimesToRunQueries) { if (executorService.isTerminated()) { - LOGGER.error("All threads got exception and already dead."); - return; + throw new IllegalThreadStateException("All threads got exception and already dead."); } if (timeout > 0 && System.currentTimeMillis() - startTimeAbsolute > timeout) { - LOGGER.warn("Timeout of {} sec reached. Aborting", timeout); - return; + throw new TimeoutException("Timeout of " + timeout + " sec reached. Aborting"); Review comment: same ########## File path: pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java ########## @@ -275,7 +277,7 @@ public static void singleThreadedQueryRunner(PerfBenchmarkDriverConf conf, List< for (String query : queries) { if (timeout > 0 && System.currentTimeMillis() - startTimeAbsolute > timeout) { LOGGER.warn("Timeout of {} sec reached. Aborting", timeout); - return; + throw new TimeoutException("Timeout of " + timeout + " sec reached. Aborting"); Review comment: btw the query runner has a potential inconsistency in its reporting where it may reset some stats every X min during a run -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org