Skip to content

Commit

Permalink
precision
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Jun 16, 2023
1 parent 08e1ba7 commit c2bd4fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/lib/dependency-graph/simulator/simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ class Simulator {

const wastedBits = wastedBytes * 8;
const wastedMs = wastedBits / bitsPerSecond * 1000;
return wastedMs;

// This is an estimate of wasted time, so we won't be more precise than 10ms.
return Math.round(wastedMs / 10) * 10;
}

/** @return {Map<string, Map<Node, CompleteNodeTiming>>} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19665,7 +19665,7 @@
"type": "debugdata",
"metricSavings": {
"FCP": 0,
"LCP": 328.4919261932373
"LCP": 330
}
}
}
Expand Down

0 comments on commit c2bd4fe

Please sign in to comment.