Skip to content

Commit

Permalink
bug 1937610 - Firefox Desktop JS docs for (Labeled) Timing Distributi…
Browse files Browse the repository at this point in the history
…on accumulate(Single)Sample(s)
  • Loading branch information
chutten committed Jan 7, 2025
1 parent 14fd732 commit 015f77a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
8 changes: 6 additions & 2 deletions docs/user/reference/metrics/labeled_timing_distributions.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ mozilla::glean::devtools::cold_toolbox_open_delay

**JavaScript**

This operation is not currently supported in JavaScript.
```js
Glean.devtools.coldToolboxOpenDelay[toolboxId].accumulateSamples(samples);
```

</div>

Expand Down Expand Up @@ -269,7 +271,9 @@ mozilla::glean::devtools::cold_toolbox_open_delay

**JavaScript**

This operation is not currently supported in JavaScript.
```js
Glean.devtools.coldToolboxOpenDelay[toolboxId].accumulateSamples(sample);
```

</div>

Expand Down
14 changes: 9 additions & 5 deletions docs/user/reference/metrics/timing_distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,14 @@ function onPageLoaded() {
```c++
#include "mozilla/glean/GleanMetrics.h"

mozilla::glean::pages::page_load.AccumulateRawSamples(sample);
mozilla::glean::pages::page_load.AccumulateRawSamples(samples);
```

**JavaScript**

This operation is not currently supported in JavaScript.
```js
Glean.pages.pageLoad.accumulateSamples(samples);
```

</div>

Expand All @@ -335,8 +337,8 @@ Accumulates a single signed sample and appends it to the metric. Prefer this
for the common use case of having a single value to avoid having to pass
a collection over a foreign language interface.

A signed value is required so that the platform-specific code can provide
us with a 64 bit signed integer if no `u64` comparable type is available.
A signed value is required so that the platform-specific code can provide
us with a 64 bit signed integer if no `u64` comparable type is available.
This will take care of filtering and reporting errors for a negative
sample.

Expand Down Expand Up @@ -416,7 +418,9 @@ mozilla::glean::pages::page_load.AccumulateRawDuration(aDuration);

**JavaScript**

This operation is not currently supported in JavaScript.
```js
Glean.pages.pageLoad.accumulateSingleSample(sample);
```

</div>

Expand Down

0 comments on commit 015f77a

Please sign in to comment.