Skip to content

Commit

Permalink
core(metrics): update lantern coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhulce committed May 4, 2018
1 parent aad3aa6 commit 5ab54e3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class FirstContentfulPaint extends MetricArtifact {
*/
get COEFFICIENTS() {
return {
intercept: 1440,
optimistic: -1.75,
pessimistic: 2.73,
intercept: 600,
optimistic: .6,
pessimistic: .5,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class FirstMeaningfulPaint extends MetricArtifact {
*/
get COEFFICIENTS() {
return {
intercept: 1532,
optimistic: -0.3,
pessimistic: 1.33,
intercept: 900,
optimistic: .45,
pessimistic: .6,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class Interactive extends MetricArtifact {
*/
get COEFFICIENTS() {
return {
intercept: 1582,
optimistic: 0.97,
pessimistic: 0.49,
intercept: 1600,
optimistic: .6,
pessimistic: .45,
};
}

Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/gather/computed/metrics/lantern-metric.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class LanternMetricArtifact extends ComputedArtifact {
const optimisticGraph = this.getOptimisticGraph(graph, traceOfTab);
const pessimisticGraph = this.getPessimisticGraph(graph, traceOfTab);

const optimisticSimulation = simulator.simulate(optimisticGraph);
const optimisticSimulation = simulator.simulate(optimisticGraph, {flexibleOrdering: true});
const pessimisticSimulation = simulator.simulate(pessimisticGraph);

const optimisticEstimate = this.getEstimateFromSimulation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ class SpeedIndex extends MetricArtifact {
*/
get COEFFICIENTS() {
return {
intercept: 200,
optimistic: 1.16,
pessimistic: 0.57,
// Negative intercept is OK because estimate is Math.max(FCP, Speed Index) and
// the optimistic estimate is based on the real observed speed index rather than a real
// lantern graph.
intercept: -250,
optimistic: 1.4,
pessimistic: 0.65,
};
}

Expand Down

0 comments on commit 5ab54e3

Please sign in to comment.