<!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>
<script>
var Y = YUI({
modules: {
'base-benchmark': {
fullpath: 'base-benchmark.js',
requires: ['dump', 'base']
},
'test-console': {
requires : ['console-filters'],
skinnable: true
},
'skin-sam-test-console': {
type : 'css'
}
},
useBrowserConsole: false
}).use('base-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, bench) {
Y.log(String(bench));
});
suite.on('complete', function () {
start.set('disabled', false);
Y.log('Finished.');
});
start.on('click', function () {
suite.run(true);
});
});
</script>
</body>
</html>