From 69a2c1e7b43b31ea21952fb29c47e39d9dff2e1c Mon Sep 17 00:00:00 2001 From: Taras Glek Date: Tue, 21 Jun 2011 14:39:14 -0700 Subject: [PATCH] Bug 665805 - Include sums in histograms sent to server r=Mossop --- toolkit/components/telemetry/TelemetryPing.js | 3 ++- toolkit/components/telemetry/tests/unit/test_TelemetryPing.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/toolkit/components/telemetry/TelemetryPing.js b/toolkit/components/telemetry/TelemetryPing.js index 46fb70282ddb..9c16c1a5fccd 100644 --- a/toolkit/components/telemetry/TelemetryPing.js +++ b/toolkit/components/telemetry/TelemetryPing.js @@ -82,7 +82,8 @@ function getHistograms() { range: [r[1], r[r.length - 1]], bucket_count: r.length, histogram_type: hgram.histogram_type, - values: {} + values: {}, + sum: hgram.sum }; let first = true; let last = 0; diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetryPing.js b/toolkit/components/telemetry/tests/unit/test_TelemetryPing.js index 28e501c824e2..f0734d03bde8 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetryPing.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetryPing.js @@ -92,7 +92,8 @@ function checkHistograms(request, response) { range: [1, 2], bucket_count: 3, histogram_type: 2, - values: {0:1, 1:1, 2:0} + values: {0:1, 1:1, 2:0}, + sum: 1 } let tc = payload.histograms[TELEMETRY_SUCCESS] do_check_eq(uneval(tc),