ChinmaySKulkarni commented on a change in pull request #749: PHOENIX-4521: 
Allow Pherf scenario to define per query max allowed query execution duration 
after which thread is interrupted
URL: https://github.com/apache/phoenix/pull/749#discussion_r410407783
 
 

 ##########
 File path: 
phoenix-pherf/src/main/java/org/apache/phoenix/pherf/workload/MultiThreadedRunner.java
 ##########
 @@ -88,13 +90,21 @@
      */
     @Override
     public Void call() throws Exception {
-        LOGGER.info("\n\nThread Starting " + threadName + " ; " + 
query.getStatement() + " for "
-                + numberOfExecutions + "times\n\n");
+        LOGGER.info("\n\nThread Starting " + threadName + " ; '" + 
query.getStatement() + "' for "
+                + numberOfExecutions + " times\n\n");
         Long start = EnvironmentEdgeManager.currentTimeMillis();
-        for (long i = numberOfExecutions; (i > 0 && 
((EnvironmentEdgeManager.currentTimeMillis() - start)
-                < executionDurationInMs)); i--) {
+        for (long i = 0; i < numberOfExecutions; i++) {
+            long elapsedTime = EnvironmentEdgeManager.currentTimeMillis() - 
start;
 
 Review comment:
   can we be more explicit with the variable names here, for clarity? For ex: 
`querySetStartTime`, `querySetElapsedTime`..etc. and similarly for variables 
used to time the query

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to