Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Oct 26, 2018
1 parent 636fcd8 commit 0a013ac
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 133 deletions.
13 changes: 5 additions & 8 deletions lighthouse-core/scripts/cleanup-LHR-for-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ function cleanAndFormatLHR(lhrString) {
/** @type {LH.Result} */
const lhr = JSON.parse(lhrString);

// Set to predictable and typical value
lhr.configSettings.auditMode = false;

// Set timing values, which change from run-to-run, to predicable values
// Set timing values, which change from run to run, to predicable values
lhr.timing.total = 12345.6789;
lhr.timing.entries.forEach((entry, i) => {
// @ts-ignore
lhr.timing.entries.forEach(entry => {
// @ts-ignore - write to readonly property
entry.duration = 100;
// @ts-ignore
entry.startTime = 100 * i + i; // 1ms gap between them
// @ts-ignore - write to readonly property
entry.startTime = 10; // Not realsitic, but avoids a lot of diff churn
});

if (extraFlag !== '--only-remove-timing') {
Expand Down
Loading

0 comments on commit 0a013ac

Please sign in to comment.