Bug 1510988 - Make the clear flag optional in snapshot API r=chutten
authorJan-Erik Rediger <jrediger@mozilla.com>
Fri, 18 Jan 2019 19:00:36 +0000
changeset 514706 95779bb379580b2ebf57acef5e400258e4dfa88d
parent 514705 5b7087dac6b99946a4d4aaa9824cea7483088031
child 514707 12d1bf5d9b3057c483c149826c0ca090fbe2b79c
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1510988
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1510988 - Make the clear flag optional in snapshot API r=chutten Differential Revision: https://phabricator.services.mozilla.com/D16966
toolkit/components/telemetry/core/nsITelemetry.idl
--- a/toolkit/components/telemetry/core/nsITelemetry.idl
+++ b/toolkit/components/telemetry/core/nsITelemetry.idl
@@ -61,64 +61,68 @@ interface nsITelemetry : nsISupports
    *   histogram_type - HISTOGRAM_EXPONENTIAL, HISTOGRAM_LINEAR, HISTOGRAM_BOOLEAN,
    *                    HISTOGRAM_FLAG, HISTOGRAM_COUNT, or HISTOGRAM_CATEGORICAL
    *   sum - sum of the bucket contents
    *   range - A 2-item array of minimum and maximum bucket size
    *   values - Map from bucket to the bucket's count
    *
    * @param aStoreName The name of the store to snapshot. Something like "main".
    * @param aClearStore Whether to clear out the histograms in the named store after snapshotting.
+   *                    Defaults to false.
    * @param aFilterTest If true, `TELEMETRY_TEST_` histograms will be filtered out.
                         Filtered histograms are still cleared if `aClearStore` is true.
    *                    Defaults to false.
    */
   [implicit_jscontext]
-  jsval getSnapshotForHistograms(in ACString aStoreName, in boolean aClearStore, [optional] in boolean aFilterTest);
+  jsval getSnapshotForHistograms(in ACString aStoreName, [optional] in boolean aClearStore, [optional] in boolean aFilterTest);
 
   /**
    * Serializes the keyed histograms from the given store to a JSON-style object.
    * The returned structure looks like:
    *   { "process": { "name1": { "key_1": histogramData1, "key_2": histogramData2 }, ...}, ... }
    *
    * @param aStoreName The name of the store to snapshot. Something like "main".
    * @param aClearStore Whether to clear out the keyed histograms in the named store after snapshotting.
+   *                    Defaults to false.
    * @param aFilterTest If true, `TELEMETRY_TEST_` histograms will be filtered out.
                         Filtered histograms are still cleared if `aClearStore` is true.
    *                    Defaults to false.
    */
   [implicit_jscontext]
-  jsval getSnapshotForKeyedHistograms(in ACString aStoreName, in boolean aClearStore, [optional] in boolean aFilterTest);
+  jsval getSnapshotForKeyedHistograms(in ACString aStoreName, [optional] in boolean aClearStore, [optional] in boolean aFilterTest);
 
   /**
    * Serializes the scalars from the given store to a JSON-style object.
    * The returned structure looks like:
    *   { "process": { "category1.probe": 1,"category1.other_probe": false, ... }, ... }.
    *
    * @param aStoreName The name of the store to snapshot. Something like "main".
    * @param aClearStore Whether to clear out the scalars in the named store after snapshotting.
+   *                    Defaults to false.
    * @param aFilterTest If true, `telemetry.test` scalars will be filtered out.
                         Filtered scalars are still cleared if `aClearStore` is true.
    *                    Defaults to false.
    */
   [implicit_jscontext]
-  jsval getSnapshotForScalars(in ACString aStoreName, in boolean aClearStore, [optional] in boolean aFilterTest);
+  jsval getSnapshotForScalars(in ACString aStoreName, [optional] in boolean aClearStore, [optional] in boolean aFilterTest);
 
   /**
    * Serializes the keyed scalars from the given store to a JSON-style object.
    * The returned structure looks like:
    *   { "process": { "category1.probe": { "key_1": 2, "key_2": 1, ... }, ... }, ... }
    *
    * @param aStoreName The name of the store to snapshot. Something like "main".
    * @param aClearStore Whether to clear out the keyed scalars in the named store after snapshotting.
+   *                    Defaults to false.
    * @param aFilterTest If true, `telemetry.test` scalars will be filtered out.
                         Filtered scalars are still cleared if `aClearStore` is true.
    *                    Defaults to false.
    */
   [implicit_jscontext]
-  jsval getSnapshotForKeyedScalars(in ACString aStoreName, in boolean aClearStore, [optional] in boolean aFilterTest);
+  jsval getSnapshotForKeyedScalars(in ACString aStoreName, [optional] in boolean aClearStore, [optional] in boolean aFilterTest);
 
   /**
    * The amount of time, in milliseconds, that the last session took
    * to shutdown.  Reads as 0 to indicate failure.
    */
   readonly attribute uint32_t lastShutdownDuration;
 
   /**