Bug 1275707, part 2 - Remove numbers from the message manager message names. r=billm
authorAndrew McCreight <continuation@gmail.com>
Wed, 01 Jun 2016 15:11:06 -0700
changeset 341045 ef70956cd95cf49221eb9055f783dbd7fa7bfdb6
parent 341044 6115c96a870103809d586830da707155b0679df8
child 341046 5885ad0c0a1d9fd25143692d3200a8ec2dcd80f0
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1275707
milestone49.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 1275707, part 2 - Remove numbers from the message manager message names. r=billm There are a huge number of different message manager messages with names of the form "ublock0:sb:{N}", where {N} is some number from 1 to over 1000. Having so many different keys seems to cause problems for telemetry and makes it harder to tell how many messages of each type there really are, so this patch combines them by eliminating any digits. It will also help for the webdev tools that use channels with names like "debug:server1.conn5.child1:packet". This will create some ambiguity (eg there are some messages of the form "ublock:sb:{N}"), but that should be a minor issue.
dom/base/nsFrameMessageManager.cpp
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -708,16 +708,17 @@ RecordMessageSize(size_t aDataLength, co
 {
   static const size_t kMinTelemetryMessageSize = 8192;
 
   if (aDataLength < kMinTelemetryMessageSize) {
     return;
   }
 
   NS_ConvertUTF16toUTF8 messageName(aMessageName);
+  messageName.StripChars("0123456789");
 
   Telemetry::Accumulate(Telemetry::MESSAGE_MANAGER_MESSAGE_SIZE, messageName,
                         aDataLength);
 }
 
 nsresult
 nsFrameMessageManager::SendMessage(const nsAString& aMessageName,
                                    JS::Handle<JS::Value> aJSON,