// Repeat the measurement 3 times. const measurementCount = 3;
// The difference between relaxed and default is negligible (especially with // SSDs). const relaxedDefaultDiffPercentage = 1;
// The difference between default and strict is notable (even with SSDs). const defaultStrictDiffPercentage = 20;
// Allow some tolerance (to deal with noise). const tolerancePercentage = (function () { if (isInChaosMode()) { return50;
}
return30;
})();
// Adjust the number of transactions, so the test takes roughly same time // across all platforms (including the chaos mode). const transactionCount = (function () { if (isInChaosMode()) { switch (mozinfo.os) { case"linux": return50;
case"mac": return7;
case"win": return650;
case"android": return1;
default: return250;
}
}
switch (mozinfo.os) { case"linux": return275;
case"mac": return1150;
case"win": return650;
case"android": return135;
default: return500;
}
})();
// A helper function (could be moved to a common place). function transposeMatrix(matrix) { for (let i = 0; i < matrix.length; i++) { for (let j = 0; j < i; j++) { const tmp = matrix[i][j];
matrix[i][j] = matrix[j][i];
matrix[j][i] = tmp;
}
}
}
// A helper function (could be moved to a common place). function getMedian(array) {
array.sort((a, b) => a - b);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.