From 4985f9867ddb1b25ec25b31adceb10992c65e4af Mon Sep 17 00:00:00 2001 From: Chris H-C Date: Thu, 1 Aug 2019 14:17:47 +0000 Subject: [PATCH] Bug 1566352 - Document GeckoView Streaming r=janerik Differential Revision: https://phabricator.services.mozilla.com/D38739 --HG-- extra : moz-landing-system : lando --- .../docs/internals/geckoview-streaming.rst | 14 ++++++++++++++ .../telemetry/docs/internals/preferences.rst | 12 +++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 toolkit/components/telemetry/docs/internals/geckoview-streaming.rst diff --git a/toolkit/components/telemetry/docs/internals/geckoview-streaming.rst b/toolkit/components/telemetry/docs/internals/geckoview-streaming.rst new file mode 100644 index 000000000000..86073a05dd7a --- /dev/null +++ b/toolkit/components/telemetry/docs/internals/geckoview-streaming.rst @@ -0,0 +1,14 @@ +GeckoView Streaming API +======================= + +As an alternative to `GeckoView <../internals/geckoview>` mode, +Telemetry can instead route Histogram accumulations out of Gecko to a Telemetry Delegate. + +To do this, ``toolkit.telemetry.geckoview.streaming`` must be set to true, +and Gecko must have been built with ``MOZ_WIDGET_ANDROID`` defined. + +Details +======= + +Accumulations from Histograms that have a ``products`` list that includes ``geckoview_streaming`` will be redirected to a small batching service in ``toolkit/components/telemetry/geckoview/streaming``. +The batching service (essentially just a table of histogram names to lists of samples) will hold on to these lists of accumulations paired to the histogram names for a length of time (``toolkit.telemetry.geckoview.batchDurationMS`` (default 5000)) after which the next accumulation will trigger the whole batch (all lists) to be passed over to the ``StreamingTelemetryDelegate``. diff --git a/toolkit/components/telemetry/docs/internals/preferences.rst b/toolkit/components/telemetry/docs/internals/preferences.rst index a86d9c33a91b..e264f137ba3f 100644 --- a/toolkit/components/telemetry/docs/internals/preferences.rst +++ b/toolkit/components/telemetry/docs/internals/preferences.rst @@ -233,12 +233,22 @@ GeckoView ``toolkit.telemetry.isGeckoViewMode`` - Whether or not Telemetry needs to run in :doc:`GeckoView <../internals/geckoview>` mode. If true, measurements persistence is enabled. Defaults to false on all products except GeckoView. + Whether or not Telemetry needs to run in :doc:`GeckoView <../internals/geckoview>` mode. If true, and ``toolkit.telemetry.geckoview.streaming`` is false, measurements persistence is enabled. Defaults to false on all products except GeckoView. ``toolkit.telemetry.geckoPersistenceTimeout`` The interval that governs how frequently measurements are saved to disk, in milliseconds. Defaults to 60000 (60 seconds). +``toolkit.telemetry.geckoview.streaming`` + + Whether the GeckoView mode we're running in is the variety that uses the :doc:`GeckoView Streaming Telemetry API <../internals/geckoview-streaming>` or not. + Defaults to false. + +``toolkit.telemetry.geckoview.batchDurationMS`` + + The duration in milliseconds over which `GeckoView Streaming Telemetry <../internals/geckoview-streaming>` will batch accumulations before passing it on to its delegate. + Defaults to 5000. + Testing -------