summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/dtracetoolkit/Code/JavaScript/func_slow.html
blob: 14fdfda3870ca1f0c4b55ed76e8fa5288afcd741 (plain)
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
<HTML>
<HEAD><TITLE>func_slow, JavaScript</TITLE></HEAD>
<BODY>
<SCRIPT type="text/javascript">
function func_c() {
	document.write("Function C<br>")
	for (i = 0; i < 30000; i++) {
		j = i + 1
	}
}

function func_b() {
	document.write("Function B<br>")
	for (i = 0; i < 20000; i++) {
		j = i + 1
	}
	func_c()
}

function func_a() {
	document.write("Function A<br>")
	for (i = 0; i < 10000; i++) {
		j = i + 1
	}
	func_b()
}

func_a()
</SCRIPT>
</BODY>
</HTML>
OpenPOWER on IntegriCloud