diff options
Diffstat (limited to 'toolkit/components/glean/bindings/private/CustomDistribution.h')
-rw-r--r-- | toolkit/components/glean/bindings/private/CustomDistribution.h | 17 |
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); |