Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (35 sloc) 968 Bytes
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>JS Instrument</title>
</head>
<body onload="run()">
<script type="text/javascript" charset="utf-8" src="instrument.js"></script>
<script type="text/javascript" charset="utf-8">
function run() {
$i.setEnabled(true);
$i.loadConsole();
for (var j = 0; j < 100; j++) {
$i.start('fullOfStars');
// some code I'm curious about
var str = '';
for (var i = 0; i < 100000; i++) {
str += '*';
}
$i.stop('fullOfStars');
}
for (var j = 0; j < 100; j++) {
$i.start('helloWorld');
// some code I'm curious about
var str = '';
for (var i = 0; i < 10; i++) {
document.body.innerHTML += '<div>helloWorld</div>';
}
$i.stop('helloWorld');
document.body.innerHTML = '';
}
}
</script>
</body>
</html>