/* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ const Cc = Components.classes; const Ci = Components.interfaces; const Cu = Components.utils; const INT_MAX = 0x7FFFFFFF; const Telemetry = Cc["@mozilla.org/base/telemetry;1"].getService(Ci.nsITelemetry); Cu.import("resource://gre/modules/Services.jsm"); function test_histogram(histogram_type, name, min, max, bucket_count) { var h = Telemetry.newHistogram(name, min, max, bucket_count, histogram_type); var r = h.snapshot().ranges; var sum = 0; for(var i=0;i