a+b,0)/times.length).toFixed(1);
this.state = 'testing_download';
const dlSize = 5 * 1024 * 1024;
const t1 = performance.now();
const r = await fetch('/tools/net/speedtest/payload?size=' + dlSize, { cache: 'no-store' });
await r.arrayBuffer();
const dlSecs = (performance.now() - t1) / 1000;
this.dl = (dlSize * 8 / 1_000_000 / dlSecs).toFixed(2);
this.state = 'testing_upload';
const ulSize = 2 * 1024 * 1024;
const blob = new Uint8Array(ulSize);
crypto.getRandomValues(blob);
const t2 = performance.now();
await fetch('/tools/net/speedtest/upload', { method: 'POST', body: blob, headers: { 'Content-Type': 'application/octet-stream' } });
const ulSecs = (performance.now() - t2) / 1000;
this.ul = (ulSize * 8 / 1_000_000 / ulSecs).toFixed(2);
this.state = 'done';
} catch(e) {
this.error = this.i18n.error;
this.state = 'idle';
}
}
}">
Speedtest
Download-, Upload-Geschwindigkeit und Latenz messen.
…
…
…