Skip to content

Commit 68e7564

Browse files
committed
fixes
Signed-off-by: amanycodes <amanycodes@gmail.com>
1 parent d90beb4 commit 68e7564

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/querying/functions.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,10 @@ annotation, you should find and remove the source of the invalid data.
415415
## `histogram_stddev()` and `histogram_stdvar()`
416416

417417
`histogram_stddev(v instant-vector)` returns the estimated standard deviation
418-
of observations for each histogram sample in `v`, based on the arithmetic mean
419-
of the buckets where the observations lie. Float samples are ignored and do not
420-
show up in the returned vector.
418+
of observations for each histogram sample in `v`, based on the geometric mean
419+
(or arithmetic mean for custom bucket histogram samples) of the buckets where
420+
the observations lie. Float samples are ignored and do not show up in the returned
421+
vector.
421422

422423
Similarly, `histogram_stdvar(v instant-vector)` returns the estimated standard
423424
variance of observations for each histogram sample in `v`.

promql/promqltest/testdata/native_histograms.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ load 10m
361361
histogram_stddev_stdvar_5 {{schema:0 count:10 sum:-100 z_bucket:0 n_buckets:[0 0 0 0 10]}}x1
362362

363363
eval instant at 10m histogram_stddev(histogram_stddev_stdvar_5)
364-
{} 1.3137084989847612
364+
{} 1.3137084989848
365365

366366
eval instant at 10m histogram_stdvar(histogram_stddev_stdvar_5)
367367
{} 1.725830020304794

web/ui/mantine-ui/src/promql/functionDocs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,8 +1267,8 @@ const funcDocs: Record<string, React.ReactNode> = {
12671267

12681268
<p>
12691269
<code>histogram_stddev(v instant-vector)</code> returns the estimated standard deviation of observations in a native
1270-
histogram, based on the arithmetic mean of the buckets where the observations lie. Samples that are not native
1271-
histograms are ignored and do not show up in the returned vector.
1270+
histogram, based on the geometric mean (or arithmetic mean for custom bucket histogram samples) of the buckets where
1271+
the observations lie. Samples that are not native histograms are ignored and do not show up in the returned vector.
12721272
</p>
12731273

12741274
<p>

0 commit comments

Comments
 (0)