From 34c3991a44a2759c5a862c874b1326d74c64e0a1 Mon Sep 17 00:00:00 2001 From: SCG82 Date: Mon, 8 Feb 2021 08:23:35 -0800 Subject: [PATCH] change EWMA factor from 0.0625 (31 period) to 0.2222 (8 period) --- speedtest_worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speedtest_worker.js b/speedtest_worker.js index 8076d8a71..590e8aa21 100644 --- a/speedtest_worker.js +++ b/speedtest_worker.js @@ -643,7 +643,7 @@ function pingTest(done) { } else { if (instspd < ping) ping = instspd; // update ping, if the instant ping is lower if (i === 2) jitter = instjitter; // discard the first jitter measurement because it might be much higher than it should be - else jitter += (instjitter - jitter) / 16; // RFC 3550 + else jitter += (instjitter - jitter) * 2 / 9; // else jitter = instjitter > jitter ? jitter * 0.3 + instjitter * 0.7 : jitter * 0.8 + instjitter * 0.2; // update jitter, weighted average. spikes in ping values are given more weight. } prevInstspd = instspd;