-
Notifications
You must be signed in to change notification settings - Fork 4
/
latency_test.html
64 lines (63 loc) · 1.95 KB
/
latency_test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!doctype html>
<html>
<head>
<title>Request small file every 2 seconds to test TCP latency</title>
</head>
<body>
<h1>Request small file every 2 seconds to test TCP latency</h1>
<script type="text/javascript">
function sleep(milliseconds){
var start = new Date().getTime();
var keep_looping = true;
while (keep_looping) {
if ((new Date().getTime() - start)> milliseconds) {
keep_looping = false;
}
}
}
sleep(2000);
document.write("<img src='https://s.yimg.com/dh/ap/default/130909/y_200_a.png?req=1rnd=" +
Math.random() + "'>");
</script><script>
sleep(2000);
document.write("<img src='y_200_a.png?req=2rnd=" +
Math.random() + "'>");
</script><script>
sleep(2000);
document.write("<img src='https://s.yimg.com/dh/ap/default/130909/y_200_a.png?req=3rnd=" +
Math.random() + "'>");
</script><script>
sleep(2000);
document.write("<img src='y_200_a.png?req=4rnd=" +
Math.random() + "'>");
</script>
<script>
sleep(2000);
document.write("<img src='https://s.yimg.com/dh/ap/default/130909/y_200_a.png?req=5rnd=" +
Math.random() + "'>");
</script><script>
sleep(2000);
document.write("<img src='y_200_a.png?req=6rnd=" +
Math.random() + "'>");
</script><script>
sleep(2000);
document.write("<img src='https://s.yimg.com/dh/ap/default/130909/y_200_a.png?req=7rnd=" +
Math.random() + "'>");
</script>
<script>
sleep(2000);
document.write("<img src='y_200_a.png?req=8rnd=" +
Math.random() + "'>");
</script>
<script>
sleep(2000);
document.write("<img src='https://s.yimg.com/dh/ap/default/130909/y_200_a.png?req=9rnd=" +
Math.random() + "'>");
</script>
<script>
sleep(2000);
document.write("<img src='y_200_a.png?req=10rnd=" +
Math.random() + "'>");
</script>
</body>
</html>