Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9dcb72f

Browse files
authored
core(lantern): inline rtt constant (#15944)
1 parent 8d19ac4 commit 9dcb72f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/lib/lantern/metrics/speed-index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import * as Lantern from '../types/lantern.js';
88
import {Metric} from '../metric.js';
99
import {BaseNode} from '../base-node.js';
10-
// TODO(15841): move this default config value into lib/lantern
11-
import {throttling as defaultThrottling} from '../../../config/constants.js';
10+
11+
const mobileSlow4GRtt = 150;
1212

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

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

5050
return {

0 commit comments

Comments
 (0)