-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
54 lines (34 loc) · 889 Bytes
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width"/>
<title>Stats.js</title>
<script type="text/javascript" src="stats.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(){
var stats = new Stats(true);
document.body.appendChild(stats.domElement);
function update(){
window.requestAnimationFrame(update);
stats.begin();
for( var i = 0; i < 100000; i++ ){
var div = document.createElement("div");
// document.body.appendChild(div);
};
stats.end();
};
window.requestAnimationFrame(update);
function fakeServerRequest(){
stats.beginPing();
setTimeout(function(){
stats.endPing();
fakeServerRequest();
}, 65);
};
fakeServerRequest();
}, false);
</script>
</head>
<body></body>
</html>