summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/bindings/private/CustomDistribution.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /toolkit/components/glean/bindings/private/CustomDistribution.h
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/glean/bindings/private/CustomDistribution.h')
-rw-r--r--toolkit/components/glean/bindings/private/CustomDistribution.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/toolkit/components/glean/bindings/private/CustomDistribution.h b/toolkit/components/glean/bindings/private/CustomDistribution.h
index 8227b024ad..8074a0542e 100644
--- a/toolkit/components/glean/bindings/private/CustomDistribution.h
+++ b/toolkit/components/glean/bindings/private/CustomDistribution.h
@@ -35,6 +35,13 @@ class CustomDistributionMetric {
void AccumulateSamples(const nsTArray<uint64_t>& aSamples) const;
/**
+ * Accumulates the provided sample in the metric.
+ *
+ * @param aSamples The sample to be recorded by the metric.
+ */
+ void AccumulateSingleSample(uint64_t aSample) const;
+
+ /**
* Accumulates the provided samples in the metric.
*
* @param aSamples The vector holding the samples to be recorded by the
@@ -46,6 +53,14 @@ class CustomDistributionMetric {
void AccumulateSamplesSigned(const nsTArray<int64_t>& aSamples) const;
/**
+ * Accumulates the provided sample in the metric.
+ *
+ * @param aSamples The signed integer sample to be recorded by the
+ * metric.
+ */
+ void AccumulateSingleSampleSigned(int64_t aSample) const;
+
+ /**
* **Test-only API**
*
* Gets the currently stored value as a DistributionData.
@@ -80,6 +95,8 @@ class GleanCustomDistribution final : public GleanMetric {
void AccumulateSamples(const dom::Sequence<int64_t>& aSamples);
+ void AccumulateSingleSample(const int64_t aSample);
+
void TestGetValue(const nsACString& aPingName,
dom::Nullable<dom::GleanDistributionData>& aRetval,
ErrorResult& aRv);