Bug 1211433 - [Metrics] Increase thresholds for reflows r=janx

This commit is contained in:
Russ Nicoletti 2015-11-19 08:42:39 -08:00
parent b5727c74fb
commit bfa8f3206a

View File

@ -446,6 +446,7 @@ var consoleWatcher = {
'SSL',
'CORS'
],
_reflowThreshold: 0,
init(client) {
this._client = client;
@ -468,6 +469,10 @@ var consoleWatcher = {
});
}
SettingsListener.observe('hud.reflows.duration', this._reflowThreshold, threshold => {
this._reflowThreshold = threshold;
});
client.addListener('logMessage', this.consoleListener);
client.addListener('pageError', this.consoleListener);
client.addListener('consoleAPICall', this.consoleListener);
@ -572,6 +577,12 @@ var consoleWatcher = {
let {start, end, sourceURL, interruptible} = packet;
metric.interruptible = interruptible;
let duration = Math.round((end - start) * 100) / 100;
// Record the reflow if the duration exceeds the threshold.
if (duration < this._reflowThreshold) {
return;
}
output += 'Reflow: ' + duration + 'ms';
if (sourceURL) {
output += ' ' + this.formatSourceURL(packet);