summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/bindings/private/TimingDistribution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/glean/bindings/private/TimingDistribution.cpp')
-rw-r--r--toolkit/components/glean/bindings/private/TimingDistribution.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/toolkit/components/glean/bindings/private/TimingDistribution.cpp b/toolkit/components/glean/bindings/private/TimingDistribution.cpp
index 78aad6d4cd..5a1a6d3daf 100644
--- a/toolkit/components/glean/bindings/private/TimingDistribution.cpp
+++ b/toolkit/components/glean/bindings/private/TimingDistribution.cpp
@@ -25,7 +25,7 @@ extern "C" NS_EXPORT void GIFFT_TimingDistributionStart(
auto mirrorId = mozilla::glean::HistogramIdForMetric(aMetricId);
if (mirrorId) {
mozilla::glean::GetTimerIdToStartsLock().apply([&](auto& lock) {
- auto tuple = std::make_tuple(aMetricId, aTimerId);
+ auto tuple = mozilla::glean::MetricTimerTuple{aMetricId, aTimerId};
// It should be all but impossible for anyone to have already inserted
// this timer for this metric given the monotonicity of timer ids.
(void)NS_WARN_IF(lock.ref()->Remove(tuple));
@@ -40,7 +40,8 @@ extern "C" NS_EXPORT void GIFFT_TimingDistributionStopAndAccumulate(
auto mirrorId = mozilla::glean::HistogramIdForMetric(aMetricId);
if (mirrorId) {
mozilla::glean::GetTimerIdToStartsLock().apply([&](auto& lock) {
- auto optStart = lock.ref()->Extract(std::make_tuple(aMetricId, aTimerId));
+ auto tuple = mozilla::glean::MetricTimerTuple{aMetricId, aTimerId};
+ auto optStart = lock.ref()->Extract(tuple);
// The timer might not be in the map to be removed if it's already been
// cancelled or stop_and_accumulate'd.
if (!NS_WARN_IF(!optStart)) {
@@ -67,8 +68,8 @@ extern "C" NS_EXPORT void GIFFT_TimingDistributionCancel(
mozilla::glean::GetTimerIdToStartsLock().apply([&](auto& lock) {
// The timer might not be in the map to be removed if it's already been
// cancelled or stop_and_accumulate'd.
- (void)NS_WARN_IF(
- !lock.ref()->Remove(std::make_tuple(aMetricId, aTimerId)));
+ auto tuple = mozilla::glean::MetricTimerTuple{aMetricId, aTimerId};
+ (void)NS_WARN_IF(!lock.ref()->Remove(tuple));
});
}
}