From 87e3a5b5fda97cd77bde4a202e9561242f231710 Mon Sep 17 00:00:00 2001 From: John Oxley Date: Thu, 30 Jan 2025 03:36:43 -0800 Subject: [PATCH] Fix docs for ExportedHistogram Summary: `ExportedHistogram` wraps `folly::Histogram`. From the folly docs https://www.internalfb.com/code/fbsource/[0f0c602d3bc63b33d7b8554fa5976ceb612d4e2b]/fbcode/folly/docs/Histogram.md?lines=54-63 and https://www.internalfb.com/code/fbsource/[d81cb3266ebe564aa44fb290afc21dbc892eaac8]/fbcode/folly/stats/Histogram.h?lines=50-59 The docstring in HHVM for `bucketSize` is incorrect and led to a significant delay in understanding what was wrong. Reviewed By: mdko Differential Revision: D68882151 fbshipit-source-id: 04f332e7ed43dad7d0811840f55b0978e194576e --- hphp/util/service-data.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hphp/util/service-data.h b/hphp/util/service-data.h index 54e1bcc0aa954..94301aadc3175 100644 --- a/hphp/util/service-data.h +++ b/hphp/util/service-data.h @@ -211,8 +211,9 @@ ExportedTimeSeries* createTimeSeries( /* * Create a histogram counter named 'name'. Return an existing one if it has * already been created. + * The number of buckets is (max - min) / bucketSize * - * 'bucketSize' specifies how many buckets to track for the histogram. + * 'bucketSize' specifies the size of each bucket * 'min' is the minimal value in the histogram. * 'max' is the maximal value in the histogram. * 'exportPercentile' specifies at what percentile values we should report the