New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add percentiles report in QuerySummary #11299
Conversation
label: can be "feature" or "enhancement". |
@klsince can be the reviewer (he has the context). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a comment on code format, otherwise LGTM
@@ -877,6 +877,10 @@ public void addValue(double value) { | |||
} | |||
} | |||
|
|||
public double getPercentile(double p){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public double getPercentile(double p){ | |
public double getPercentile(double p) { |
@@ -944,6 +948,15 @@ public double getAvgClientTime() { | |||
return _avgClientTime; | |||
} | |||
|
|||
public double getPercentile(double p){ | |||
if(_statisticsList == null || _statisticsList.size() == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(_statisticsList == null || _statisticsList.size() == 0) | |
if (_statisticsList == null || _statisticsList.size() == 0) { | |
return 0.0; | |
} |
@@ -944,6 +948,16 @@ public double getAvgClientTime() { | |||
return _avgClientTime; | |||
} | |||
|
|||
public double getPercentile(double p) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we don't need this method, as we have this method below, and we can get any percentile we'd need from the list of stats.
public List<Statistics> getStatisticsList() {
return _statisticsList;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Statistics class is a private one.
Having the public getPercentile() can allow external usage of the percentile stats.
Codecov Report
@@ Coverage Diff @@
## master #11299 +/- ##
=======================================
Coverage 0.11% 0.11%
=======================================
Files 2230 2230
Lines 120140 120140
Branches 18218 18218
=======================================
Hits 137 137
Misses 119983 119983
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
* Exposing percentile values of the runs --------- Co-authored-by: zhenyun <test@gmail.com>
feature
Currently QuerySummary only exposes avg value.
Exposing percentile values (e.g. P99) is useful.
Example usage: after running queries, we can decide whether the query latency is acceptable or not based on high percentile values.