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.
This commit is contained in:
Andrew McCreight 2016-06-01 15:11:06 -07:00
parent 263493a069
commit fdd63bef5d

View File

@ -713,6 +713,7 @@ RecordMessageSize(size_t aDataLength, const nsAString& aMessageName)
}
NS_ConvertUTF16toUTF8 messageName(aMessageName);
messageName.StripChars("0123456789");
Telemetry::Accumulate(Telemetry::MESSAGE_MANAGER_MESSAGE_SIZE, messageName,
aDataLength);