-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
event-custom-benchmark.html
67 lines (52 loc) · 1.67 KB
/
event-custom-benchmark.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
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Benchmarks</title>
</head>
<body class="yui3-skin-sam">
<p><button id="start">Start Benchmarks</button></p>
<div id="log"></div>
<applet code="nano" archive="https://github.com/bestiejs/benchmark.js/raw/v1.0.0/nano.jar" style="display: none;"></applet>
<script type='text/javascript' src="https://raw.github.com/bestiejs/benchmark.js/v1.0.0/benchmark.js"></script>
<!--script src="http://yui.yahooapis.com/3.6.0pr2/build/yui/yui.js"></script-->
<script src="../../../../build/yui/yui.js"></script>
<script>
var Y = YUI({
modules: {
'event-custom-benchmark': {
fullpath: 'event-custom-benchmark.js',
requires: ['event-custom', 'widget']
},
'test-console': {
fullpath : '../../../common/tests/assets/test-console.js',
requires : ['console-filters'],
skinnable: true
},
'skin-sam-test-console': {
fullpath: '../../../common/tests/assets/test-console.css',
type : 'css'
}
},
useBrowserConsole: false
}).use('event-custom-benchmark', 'node-base', 'test-console', function (Y) {
var suite = Y.BenchmarkSuite,
start = Y.one('#start');
suite.on('start', function () {
start.set('disabled', true);
Y.log('Starting benchmarks.');
});
suite.on('cycle', function (ev) {
Y.log(String(ev.target));
});
suite.on('complete', function () {
start.set('disabled', false);
Y.log('Finished.');
});
start.on('click', function () {
suite.run({async:true});
});
});
</script>
</body>
</html>