Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev-master' of github.com:yui/yui3 into dev-master
- Loading branch information
Showing
5 changed files
with
187 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
YUI.add('tabview-benchmark', function (Y) { | ||
var suite = Y.BenchmarkSuite = new Benchmark.Suite(); | ||
|
||
suite.add('new Y.TabView()', function() { | ||
var tabview = new Y.TabView({ | ||
children: [{ | ||
label: 'foo', | ||
content: '<p>foo content</p>' | ||
}, { | ||
label: 'bar', | ||
content: '<p>bar content</p>' | ||
}, { | ||
label: 'baz', | ||
content: '<p>baz content</p>' | ||
}] | ||
}); | ||
}); | ||
|
||
suite.add('new Y.TabView().destroy', function() { | ||
var tabview = new Y.TabView({ | ||
children: [{ | ||
label: 'foo', | ||
content: '<p>foo content</p>' | ||
}, { | ||
label: 'bar', | ||
content: '<p>bar content</p>' | ||
}, { | ||
label: 'baz', | ||
content: '<p>baz content</p>' | ||
}] | ||
}).destroy(true); | ||
}); | ||
|
||
}, '@VERSION@', {requires: ['tabview']}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!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 src="http://pieisgood.org/misc/benchmark/benchmark.js"></script> | ||
|
||
<script src="../../../../build/yui/yui.js"></script> | ||
<script> | ||
var Y = YUI({ | ||
modules: { | ||
'tabview-benchmark': { | ||
fullpath: 'tabview-benchmark.js', | ||
requires: ['tabview'] | ||
}, | ||
|
||
'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('tabview-benchmark', '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 (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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
YUI.add('transition-benchmark', function (Y) { | ||
var suite = Y.BenchmarkSuite = new Benchmark.Suite(), | ||
testNode = Y.one('#demo'); | ||
|
||
suite.add('new Y.Transition()', function() { | ||
new Y.Transition(demo, { | ||
width: 0, | ||
height: { | ||
value: 0, | ||
delay: 1 | ||
}, | ||
easing: 'ease-in', | ||
duration: 500, | ||
iterations: 10 | ||
}) | ||
}); | ||
|
||
|
||
}, '@VERSION@', {requires: ['transition']}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Benchmarks</title> | ||
|
||
<style> | ||
#demo { | ||
background: #ccc; | ||
width: 100px; | ||
height: 100px; | ||
} | ||
</style> | ||
</head> | ||
<body class="yui3-skin-sam"> | ||
|
||
<p><button id="start">Start Benchmarks</button></p> | ||
|
||
<div id="log"></div> | ||
<div id="demo"></div> | ||
<applet code="nano" archive="https://github.com/bestiejs/benchmark.js/raw/v1.0.0/nano.jar" style="display: none;"></applet> | ||
<script src="http://pieisgood.org/misc/benchmark/benchmark.js"></script> | ||
|
||
<script src="../../../../build/yui/yui.js"></script> | ||
<script> | ||
var Y = YUI({ | ||
modules: { | ||
'transition-benchmark': { | ||
fullpath: 'transition-benchmark.js', | ||
requires: ['transition'] | ||
}, | ||
|
||
'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('transition-benchmark', '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 (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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters