Tim Armstrong has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14280 )
Change subject: IMPALA-8946: Fix histogram rendering to Prometheus ...................................................................... IMPALA-8946: Fix histogram rendering to Prometheus Prometheus has two formats that allows to calculate quantiles (on client side): Histograms and Summaries. The former requires to pick a set of buckets, while the latter only requires to specifiy which quantiles (percentiles) the application wants to provide. The difference between summaries and histograms on Prometheus can be found here: https://prometheus.io/docs/practices/histograms/ Previous to this changes, Impala histograms were rendered as Prometheus histograms, but it was calculating percentiles instead of bucketing the recorded values, which is not what Prometheus clients expects. From now on, Impala histograms will be rendered as Prometheus summaries instead, which expects quantiles. To be compliant with Prometheus summaries, a `_sum` serie needs to be added, containing the sum of all the registered values. The current `HdrHistogram` implementation on be::utils does not have the `TotalSum` method (and the required properties to track it). I copied the implementation from be::kudu::utils and added a couple of unit tests which covers the sum method. Also adapted the Prometheus tests to verify that sum serie is properly rendered. Change-Id: I8849586964140c040ca4ea14b777c2d98d126b59 Reviewed-on: http://gerrit.cloudera.org:8080/14280 Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Reviewed-by: Tim Armstrong <tarmstr...@cloudera.com> --- M be/src/util/CMakeLists.txt A be/src/util/hdr-histogram-test.cc M be/src/util/hdr-histogram.cc M be/src/util/hdr-histogram.h M be/src/util/histogram-metric.cc M be/src/util/metrics-test.cc 6 files changed, 127 insertions(+), 75 deletions(-) Approvals: Impala Public Jenkins: Verified Tim Armstrong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/14280 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I8849586964140c040ca4ea14b777c2d98d126b59 Gerrit-Change-Number: 14280 Gerrit-PatchSet: 3 Gerrit-Owner: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>