Bug 1150548 - MISBEHAVING_ADDONS_CPOW_TIME_MS is in milliseconds, but is filled with microseconds data. r=yoric

This commit is contained in:
David Rajchenbach-Teller 2015-04-05 12:02:30 +02:00
parent 3c607b7791
commit 59267164cf
2 changed files with 3 additions and 3 deletions

View File

@ -158,7 +158,7 @@ let AddonWatcher = {
}
if (diff.totalCPOWTime > 0) {
Telemetry.getKeyedHistogramById("MISBEHAVING_ADDONS_CPOW_TIME_MS").
add(addonId, diff.totalCPOWTime);
add(addonId, diff.totalCPOWTime / 1000);
}
// Report mibehaviors to the user.

View File

@ -82,7 +82,7 @@ let burn_rubber = Task.async(function*({histogramName, topic, expectedReason, pr
Assert.equal(reason, expectedReason, "Reason is valid");
let snap2 = histogram.snapshot(ADDON_ID);
Assert.ok(snap2.sum > expectedMinSum, `Histogram ${histogramName} recorded a gravity of ${snap2.sum}, expecting at least ${expectedMinSum}.`);
Assert.ok(snap2.sum >= expectedMinSum, `Histogram ${histogramName} recorded a gravity of ${snap2.sum}, expecting at least ${expectedMinSum}.`);
} finally {
AddonWatcher.uninit();
for (let key of Object.keys(prefs)) {
@ -121,6 +121,6 @@ add_task(function* test_burn_CPOW() {
histogramName: "MISBEHAVING_ADDONS_CPOW_TIME_MS",
topic: "test-addonwatcher-burn-some-cpow",
expectedReason: "totalCPOWTime",
expectedMinSum: 1000,
expectedMinSum: 400,
});
});