Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26117efcf0 | ||
|
|
30b903d7da |
35
README.md
35
README.md
@@ -10,20 +10,26 @@ and runs great on static hosting.
|
|||||||
You simply upload the `index.html` file and generate
|
You simply upload the `index.html` file and generate
|
||||||
the binary testing files.
|
the binary testing files.
|
||||||
|
|
||||||
> [!TIP]
|
- [Example](#example)
|
||||||
> The number precision can be changed up to 3 decimals using the arrow keys on your keyboard.
|
|
||||||
|
|
||||||
> [!TIP]
|
|
||||||
> The speedtest is at its best when the connection is as
|
|
||||||
> short as possible. For example, on your NAS or RPi to
|
|
||||||
> check on your LAN bandwidth.
|
|
||||||
|
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Note on testing](#note-on-testing)
|
- [Note on testing](#note-on-testing)
|
||||||
- [Unlicense](#unlicense)
|
- [Unlicense](#unlicense)
|
||||||
- [Author](#author)
|
- [Author](#author)
|
||||||
|
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
The link below has the same HTML file (with stats)
|
||||||
|
and is basic static webhosting with no backend
|
||||||
|
processing. The test files were generated using the
|
||||||
|
`fallocate` command.
|
||||||
|
|
||||||
|
<https://speedtest.fvdm.com/>
|
||||||
|
|
||||||
|
You can change the number precision up to 3 decimals using the arrow
|
||||||
|
keys on your keyboard.
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Just clone the repo:
|
Just clone the repo:
|
||||||
@@ -80,6 +86,15 @@ These commands only create the files in the filesystem.
|
|||||||
No bytes are actually written to the storage.
|
No bytes are actually written to the storage.
|
||||||
The suffix `m` is megabytes and `g` is gigabytes and so on.
|
The suffix `m` is megabytes and `g` is gigabytes and so on.
|
||||||
|
|
||||||
|
Or you can download them from my server.
|
||||||
|
|
||||||
|
**Please don't hotlink!!**
|
||||||
|
|
||||||
|
* [1mb.bin](https://fvdm.com/speedtest/1mb.bin)
|
||||||
|
* [5mb.bin](https://fvdm.com/speedtest/5mb.bin)
|
||||||
|
* [10mb.bin](https://fvdm.com/speedtest/10mb.bin)
|
||||||
|
* [100mb.bin](https://fvdm.com/speedtest/100mb.bin)
|
||||||
|
|
||||||
|
|
||||||
## Note on testing
|
## Note on testing
|
||||||
|
|
||||||
@@ -98,6 +113,10 @@ my provider's speedtest I get double at least. Doing the same to my
|
|||||||
LiquidSky box in Frankfurt I easily get over 900 Mbit. So there is a
|
LiquidSky box in Frankfurt I easily get over 900 Mbit. So there is a
|
||||||
bottleneck somewhere between the web server and my home ISP.
|
bottleneck somewhere between the web server and my home ISP.
|
||||||
|
|
||||||
|
The speedtest is at its best when the connection is as
|
||||||
|
short as possible. For example, on your NAS or RPi to
|
||||||
|
check on your LAN bandwidth.
|
||||||
|
|
||||||
|
|
||||||
Unlicense
|
Unlicense
|
||||||
---------
|
---------
|
||||||
|
|||||||
12
index.html
12
index.html
@@ -293,11 +293,11 @@
|
|||||||
document.querySelector ('progress').value = 0;
|
document.querySelector ('progress').value = 0;
|
||||||
document.querySelector ('progress').style.visibility = 'visible';
|
document.querySelector ('progress').style.visibility = 'visible';
|
||||||
|
|
||||||
req.onprogress = progEv => {
|
req.onprogress = (progEv) => {
|
||||||
testRunning ('download', progEv);
|
testRunning ('download', progEv);
|
||||||
};
|
};
|
||||||
|
|
||||||
req.onreadystatechange = reqEv => {
|
req.onreadystatechange = (reqEv) => {
|
||||||
if (req.readyState === 4) {
|
if (req.readyState === 4) {
|
||||||
testDone ('download', btnEv, reqEv);
|
testDone ('download', btnEv, reqEv);
|
||||||
}
|
}
|
||||||
@@ -318,20 +318,20 @@
|
|||||||
start = Date.now ();
|
start = Date.now ();
|
||||||
|
|
||||||
if (req.upload) {
|
if (req.upload) {
|
||||||
req.upload.onprogress = progEv => {
|
req.upload.onprogress = (progEv) => {
|
||||||
testRunning ('upload', progEv);
|
testRunning ('upload', progEv);
|
||||||
};
|
};
|
||||||
|
|
||||||
req.upload.onloadend = reqEv => {
|
req.upload.onloadend = (reqEv) => {
|
||||||
testDone ('upload', btnEv, reqEv);
|
testDone ('upload', btnEv, reqEv);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
req.onprogress = progEv => {
|
req.onprogress = (progEv) => {
|
||||||
testRunning ('upload', progEv);
|
testRunning ('upload', progEv);
|
||||||
};
|
};
|
||||||
|
|
||||||
req.onreadystatechange = onreadystatechange = reqEv => {
|
req.onreadystatechange = onreadystatechange = (reqEv) => {
|
||||||
if (req.readyState === 4) {
|
if (req.readyState === 4) {
|
||||||
testDone ('upload', btnEv, reqEv);
|
testDone ('upload', btnEv, reqEv);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user