Skip to content

Commit 8db1daa

Browse files
authored
Create Example.html
1 parent b5f21bf commit 8db1daa

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Example.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Example RunBenchmark.js</title>
5+
</head>
6+
<body>
7+
<b>
8+
See Console!
9+
</b>
10+
<script type="text/javascript" src="RunBenchmark.js"></script>
11+
<script type="text/javascript">
12+
//This is only a test function!
13+
//E.g: fibonacci
14+
function test(num)
15+
{
16+
if(num <= 1)
17+
{
18+
return 1;
19+
}
20+
return test(num - 1) + test(num - 2);
21+
}
22+
benchmark(test,10);
23+
benchmarks
24+
(
25+
benchmark(test,20),
26+
benchmark(test,25),
27+
benchmark(test,30),
28+
benchmark(test,40),
29+
);
30+
</script>
31+
</body>
32+
</html>

0 commit comments

Comments
 (0)