Bug 1363725 - Changed inconsistent occurrence of 'all_child', 'all_childs' to 'all_children' and 'AllChilds' to 'AllChildren' in code and docs. r=chutten
authorHardik Tyagi <hrdktg@gmail.com>
Wed, 31 Jan 2018 18:50:30 +0530
changeset 402186 df844dbc028eb9fe5d2d1dcaf1ba42d2fe1ecc30
parent 402185 841512e696b91825d24c6dd1a18d277c5f7d2be4
child 402187 9fcc7a8c7da0155c20cf155e2752308cc5f7f58f
push id99504
push userdluca@mozilla.com
push dateFri, 02 Feb 2018 10:52:34 +0000
treeherdermozilla-inbound@9fcc7a8c7da0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschutten
bugs1363725
milestone60.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 1363725 - Changed inconsistent occurrence of 'all_child', 'all_childs' to 'all_children' and 'AllChilds' to 'AllChildren' in code and docs. r=chutten
toolkit/components/telemetry/TelemetryCommon.cpp
toolkit/components/telemetry/TelemetryCommon.h
toolkit/components/telemetry/docs/collection/events.rst
toolkit/components/telemetry/docs/collection/scalars.rst
toolkit/components/telemetry/shared_telemetry_utils.py
--- a/toolkit/components/telemetry/TelemetryCommon.cpp
+++ b/toolkit/components/telemetry/TelemetryCommon.cpp
@@ -65,23 +65,23 @@ CanRecordDataset(uint32_t aDataset, bool
   // We're not recording extended telemetry or this is not the base
   // dataset. Bail out.
   return false;
 }
 
 bool
 CanRecordInProcess(RecordedProcessType processes, GeckoProcessType processType)
 {
-  bool recordAllChild = !!(processes & RecordedProcessType::AllChilds);
+  bool recordAllChildren = !!(processes & RecordedProcessType::AllChildren);
   // We can use (1 << ProcessType) due to the way RecordedProcessType is defined.
   bool canRecordProcess =
     !!(processes & static_cast<RecordedProcessType>(1 << processType));
 
   return canRecordProcess ||
-         ((processType != GeckoProcessType_Default) && recordAllChild);
+         ((processType != GeckoProcessType_Default) && recordAllChildren);
 }
 
 bool
 CanRecordInProcess(RecordedProcessType processes, ProcessID processId)
 {
   return CanRecordInProcess(processes, GetGeckoProcessType(processId));
 }
 
--- a/toolkit/components/telemetry/TelemetryCommon.h
+++ b/toolkit/components/telemetry/TelemetryCommon.h
@@ -13,21 +13,21 @@
 #include "mozilla/TypedEnumBits.h"
 #include "mozilla/TelemetryProcessEnums.h"
 
 namespace mozilla {
 namespace Telemetry {
 namespace Common {
 
 enum class RecordedProcessType : uint32_t {
-  Main       = (1 << GeckoProcessType_Default),  // Also known as "parent process"
-  Content    = (1 << GeckoProcessType_Content),
-  Gpu        = (1 << GeckoProcessType_GPU),
-  AllChilds  = 0xFFFFFFFF - 1,  // All the children processes (i.e. content, gpu, ...)
-  All        = 0xFFFFFFFF       // All the processes
+  Main         = (1 << GeckoProcessType_Default),  // Also known as "parent process"
+  Content      = (1 << GeckoProcessType_Content),
+  Gpu          = (1 << GeckoProcessType_GPU),
+  AllChildren  = 0xFFFFFFFF - 1,  // All the child processes (i.e. content, gpu, ...)
+  All          = 0xFFFFFFFF       // All the processes
 };
 MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(RecordedProcessType);
 
 template<class EntryType>
 class AutoHashtable : public nsTHashtable<EntryType>
 {
 public:
   explicit AutoHashtable(uint32_t initLength =
--- a/toolkit/components/telemetry/docs/collection/events.rst
+++ b/toolkit/components/telemetry/docs/collection/events.rst
@@ -100,17 +100,17 @@ The following event properties are valid
 - ``objects`` *(required, list of strings)*: The valid event objects.
 - ``description`` *(required, string)*: Description of the event and its semantics.
 - ``release_channel_collection`` *(optional, string)*: This can be set to ``opt-in`` (default) or ``opt-out``.
 - ``record_in_processes`` *(required, list of strings)*: A list of processes the event can be recorded in. Currently supported values are:
 
   - ``main``
   - ``content``
   - ``gpu``
-  - ``all_child`` (record in all the child processes)
+  - ``all_children`` (record in all the child processes)
   - ``all`` (record in all the processes).
 
 - ``bug_numbers`` *(required, list of numbers)*: A list of Bugzilla bug numbers that are relevant to this event.
 - ``notification_emails`` *(required, list of strings)*: A list of emails of owners for this event. This is used for contact for data reviews and potentially to email alerts.
 - expiry: There are two properties that can specify expiry, at least one needs to be set:
 
   - ``expiry_version`` *(string)*: The version number in which the event expires, e.g. ``"50"``, or ``"never"``. A version number of type "N" is automatically converted to "N.0a1" in order to expire the event also in the development channels. For events that never expire the value ``never`` can be used.
 
--- a/toolkit/components/telemetry/docs/collection/scalars.rst
+++ b/toolkit/components/telemetry/docs/collection/scalars.rst
@@ -152,17 +152,17 @@ Required Fields
 - ``expires``: The version number in which the scalar expires, e.g. "30"; a version number of type "N" is automatically converted to "N.0a1" in order to expire the scalar also in the development channels. A telemetry probe acting on an expired scalar will print a warning into the browser console. For scalars that never expire the value ``never`` can be used.
 - ``kind``: A string representing the scalar type. Allowed values are ``uint``, ``string`` and ``boolean``.
 - ``notification_emails``: A list of email addresses to notify with alerts of expiring probes. More importantly, these are used by the data steward to verify that the probe is still useful.
 - ``record_in_processes``: A list of processes the scalar is allowed to record in. Currently supported values are:
 
   - ``main``;
   - ``content``;
   - ``gpu``;
-  - ``all_child`` (record in all the child processes);
+  - ``all_children`` (record in all the child processes);
   - ``all`` (record in all the processes).
 
 Optional Fields
 ---------------
 
 - ``cpp_guard``: A string that gets inserted as an ``#ifdef`` directive around the automatically generated C++ declaration. This is typically used for platform-specific scalars, e.g. ``ANDROID``.
 - ``release_channel_collection``: This can be either ``opt-in`` (default) or ``opt-out``. With the former the scalar is submitted by default on pre-release channels, unless the user has opted out. With the latter the scalar is submitted by default on release and pre-release channels, unless the user has opted out.
 - ``keyed``: A boolean that determines whether this is a keyed scalar. It defaults to ``False``.
--- a/toolkit/components/telemetry/shared_telemetry_utils.py
+++ b/toolkit/components/telemetry/shared_telemetry_utils.py
@@ -10,20 +10,22 @@ from __future__ import print_function
 import re
 import yaml
 import sys
 
 # This is a list of flags that determine which process a measurement is allowed
 # to record from.
 KNOWN_PROCESS_FLAGS = {
     'all': 'All',
-    'all_childs': 'AllChilds',
+    'all_children': 'AllChildren',
     'main': 'Main',
     'content': 'Content',
     'gpu': 'Gpu',
+    # Historical Values
+    'all_childs': 'AllChildren',  # Supporting files from before bug 1363725
 }
 
 PROCESS_ENUM_PREFIX = "mozilla::Telemetry::Common::RecordedProcessType::"
 
 
 class ParserError(Exception):
     """Thrown by different probe parsers. Errors are partitioned into
     'immediately fatal' and 'eventually fatal' so that the parser can print