mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1211433 - [Metrics] Increase thresholds for reflows r=janx
This commit is contained in:
parent
b5727c74fb
commit
bfa8f3206a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user