This is an automated email from the ASF dual-hosted git repository.

xbli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 95f2382a6e Add percentiles report in QuerySummary  (#11299)
95f2382a6e is described below

commit 95f2382a6e4a76b39677c9ed5aef1fa7f71a50d5
Author: Zen <[email protected]>
AuthorDate: Tue Aug 8 18:25:26 2023 -0700

    Add percentiles report in QuerySummary  (#11299)
    
    * Exposing percentile values of the runs
    
    ---------
    
    Co-authored-by: zhenyun <[email protected]>
---
 .../main/java/org/apache/pinot/tools/perf/QueryRunner.java | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git 
a/pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java 
b/pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java
index 258ac421a7..8307a2152d 100644
--- a/pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java
+++ b/pinot-tools/src/main/java/org/apache/pinot/tools/perf/QueryRunner.java
@@ -877,6 +877,10 @@ public class QueryRunner extends AbstractBaseCommand 
implements Command {
       }
     }
 
+    public double getPercentile(double p) {
+      return _statistics.getPercentile(p);
+    }
+
     public void report() {
       synchronized (_statistics) {
         
LOGGER.info("--------------------------------------------------------------------------------");
@@ -944,6 +948,16 @@ public class QueryRunner extends AbstractBaseCommand 
implements Command {
       return _avgClientTime;
     }
 
+    public double getPercentile(double p) {
+      if (_statisticsList == null || _statisticsList.size() == 0) {
+        return 0.0;
+      }
+
+      // the last run's statistics is used;
+      return _statisticsList.get(_statisticsList.size() - 1).getPercentile(p);
+    }
+
+
     public List<Statistics> getStatisticsList() {
       return _statisticsList;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to