Add note about VPN overhead to speedtest
This commit is contained in:
@@ -75,6 +75,14 @@ import Speedtest from "./Speedtest.svelte";
|
|||||||
This means that the data has to travel further and is more likely to
|
This means that the data has to travel further and is more likely to
|
||||||
be throttled.
|
be throttled.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
VPN services also add overhead to your connections, which lowers
|
||||||
|
effective download speed. VPNs using OpenVPN lower your download
|
||||||
|
speed by approximately 17.2%, and VPNs using the more modern
|
||||||
|
WireGuard protocol lower your download speed by approximately 4.5%.
|
||||||
|
To get most accurate results make sure you have any VPN services
|
||||||
|
turned off.
|
||||||
|
</p>
|
||||||
<h2>How do I read these results?</h2>
|
<h2>How do I read these results?</h2>
|
||||||
<p>
|
<p>
|
||||||
If the speed is a lot slower than your usual downloads it can mean
|
If the speed is a lot slower than your usual downloads it can mean
|
||||||
|
@@ -83,11 +83,11 @@ const measure_speed = (stop, test_duration) => {
|
|||||||
// Updates per second
|
// Updates per second
|
||||||
const ups = (1000/update_interval)
|
const ups = (1000/update_interval)
|
||||||
|
|
||||||
// This slice contains the speed measurements for three seconds of the test.
|
// This slice contains the speed measurements for two seconds of the test.
|
||||||
// This value is averaged and if the average is higher than the previously
|
// This value is averaged and if the average is higher than the previously
|
||||||
// calculated average then it is saved. The resulting speed is the highest
|
// calculated average then it is saved. The resulting speed is the highest
|
||||||
// speed that was sustained for three seconds at any point in the test
|
// speed that was sustained for two seconds at any point in the test
|
||||||
const hist = new Uint32Array(ups*3)
|
const hist = new Uint32Array(ups*2)
|
||||||
let idx = 0
|
let idx = 0
|
||||||
|
|
||||||
// This var measures for how many ticks the max speed has not changed. When
|
// This var measures for how many ticks the max speed has not changed. When
|
||||||
@@ -96,12 +96,19 @@ const measure_speed = (stop, test_duration) => {
|
|||||||
let unchanged = 0
|
let unchanged = 0
|
||||||
const unchanged_limit = (test_duration/3)/update_interval
|
const unchanged_limit = (test_duration/3)/update_interval
|
||||||
|
|
||||||
|
|
||||||
|
console.debug(
|
||||||
|
"Test duration", test_duration,
|
||||||
|
"interval", update_interval,
|
||||||
|
"unchanged_limit", unchanged_limit,
|
||||||
|
"history", hist.length,
|
||||||
|
)
|
||||||
|
|
||||||
|
// Variables used in the loop
|
||||||
let previous_transferred = 0
|
let previous_transferred = 0
|
||||||
const start = Date.now()
|
const start = Date.now()
|
||||||
|
|
||||||
console.debug("Test duration", test_duration, "interval", update_interval, "history", hist.length)
|
const measure = async () => {
|
||||||
|
|
||||||
let measure = async () => {
|
|
||||||
// Update the speed measurement
|
// Update the speed measurement
|
||||||
hist[idx%hist.length] = data_received - previous_transferred
|
hist[idx%hist.length] = data_received - previous_transferred
|
||||||
previous_transferred = data_received
|
previous_transferred = data_received
|
||||||
@@ -145,7 +152,10 @@ const measure_speed = (stop, test_duration) => {
|
|||||||
history.replaceState(
|
history.replaceState(
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
"#s="+speed+"&l="+latency+"&t="+data_received+"&h="+encodeURIComponent(server),
|
"#s="+Math.round(speed)+
|
||||||
|
"&l="+latency+
|
||||||
|
"&t="+data_received+
|
||||||
|
"&h="+encodeURIComponent(server),
|
||||||
)
|
)
|
||||||
result_link = window.location.href
|
result_link = window.location.href
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user