Skip to content

Commit

Permalink
core(lantern): inline rtt constant (#15944)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored Apr 15, 2024
1 parent 8d19ac4 commit 9dcb72f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/lib/lantern/metrics/speed-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import * as Lantern from '../types/lantern.js';
import {Metric} from '../metric.js';
import {BaseNode} from '../base-node.js';
// TODO(15841): move this default config value into lib/lantern
import {throttling as defaultThrottling} from '../../../config/constants.js';

const mobileSlow4GRtt = 150;

/** @typedef {import('../base-node.js').Node} Node */

Expand Down Expand Up @@ -44,7 +44,7 @@ class SpeedIndex extends Metric {
// lantern test data set. See core/scripts/test-lantern.sh for more detail.
// While the coefficients haven't been analyzed at the interpolated points, it's our current best effort.
const defaultCoefficients = this.COEFFICIENTS;
const defaultRttExcess = defaultThrottling.mobileSlow4G.rttMs - 30;
const defaultRttExcess = mobileSlow4GRtt - 30;
const multiplier = Math.max((rttMs - 30) / defaultRttExcess, 0);

return {
Expand Down

0 comments on commit 9dcb72f

Please sign in to comment.