This patch enables generating a JSON file that mirrors the scalar definitions
in Scalars.yaml. On local developer builds, this file is loaded when Firefox
starts to register all the scalars. If some change was introduced in the
definition files, the new scalar will be dynamically added.
The JSON definition file will be regenerated every time an artifact build
is performed or the build faster command is invoked.
MozReview-Commit-ID: Do3WjE38aIK
The properties limit was being exceeded because the telemetry code itself
added a num_slices property. The GC already adds a slices property
(containing the number of slices) so I've fixed the issue by removing the
creation of the num_slices property, which will stop this limit from being
exceeded.
Extended the Telemetry::Accumulate() API to accept a string key and a nsTArray of Telemetry::LABELS_*
enums. The typesafety of the class templates ensures there are no label mismatches within the array.
Since there is no singular version for accumulating a single string label into a keyed categorical
histogram, support for the plural version with multiple string labels has not been included here.
I thought that I fixed an off-by-one error in part 1 of this patch series,
but I didn't, I introduced one. I'm not sure why the original code didn't
work.
This patch also adds more testing (to avoid off-by-ones) and better logging
that may help if the original problem comes back.
Telemetry::Accumulate now supports two new signatures: Accumulate(HistogramId, nsTArray stringLabels) and
Accumulate(nsTArray enumValues). In the stringLabels case, if the array contains an invalid label, then no
samples are accumulated at all. In the enumValues array case, the class template ensures that we do not have
a mismatch of labels in the array, since the enumValues class is tied to the id of the histogram we want to
accumulate to.
+ Log limitProperties failures.
+ Don't remove all the properties from the main GC object, some are needed
later, just reduce it to the 7 necessary properties.
toolkit/components/telemetry/tests/unit/test_TelemetryGC.js:
toolkit/components/telemetry/tests/unit/xpcshell.ini:
Add new unit test.
toolkit/components/telemetry/GCTelemetry.jsm:
Add an extra method to make testing easier.
js/src/gc/Statistics.cpp:
Add a reference to the unit test for anyone modifying this code.
Extended the Telemetry::Accumulate API to take a Histogram ID, string key, and a nsTArray<uint32_t> of samples.
Test cases check for linear, count and histograms with a set of allowed keys. Made changes to fix try failures.
Added another Telemetry::Accumulate function that takes a histogram id and an array of samples as arguments.
As of this patch, adding multiple samples to keyed and categorical histograms is not supported.
This enables whitelisted pages to send messages to the chrome using
asynchronous messaging from the content. This patch only adds the
API and test coverage. The first consumer of the API will be added
as part of bug 1417479.
MozReview-Commit-ID: ESxFFjvhpWA
This enables whitelisted pages to send messages to the chrome using
asynchronous messaging from the content. This patch only adds the
API and test coverage. The first consumer of the API will be added
as part of bug 1417479.
MozReview-Commit-ID: ESxFFjvhpWA
If we attempt to register again an old dynamic scalar, check if the new
definition makes it expired. If so, update the expiration state and propagate
the new "expired" scalar to the content proecesses.
MozReview-Commit-ID: A2LFN1irw4i
We're starting a shift towards talking about release/prerelease data instead of
base/extended collection. For now this is just a naming change.
At the same time, we can render these attributes read-only, which is nice.
MozReview-Commit-ID: IRuKpzLYW7i