Skip to content
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

bug 1937610 - Firefox Desktop JS docs for (Labeled) Timing Distribution accumulate(Single)Sample(s) #3038

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading