Skip to content

Commit

Permalink
Merge branch 'master' into dev-master
Browse files Browse the repository at this point in the history
  • Loading branch information
derek committed Apr 9, 2013
2 parents 9b58e0a + b302ce2 commit e5d8cea
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 52 deletions.
36 changes: 36 additions & 0 deletions src/common/tests/performance.json
@@ -0,0 +1,36 @@
[
"scrollview/tests/benchmark/scrollview-benchmark.js",
"base/tests/benchmark/base-benchmark.js",
"app/tests/benchmark/app-benchmark-model.js",
"app/tests/benchmark/app-benchmark-view.js",
"event-custom/tests/benchmark/event-custom-benchmark.js",
"node/tests/perf/node-attrs-benchmark.html",
"node/tests/perf/node-core-benchmark.html",
"node/tests/perf/node-create-benchmark.html",
"node/tests/perf/node-data-benchmark.html",
"node/tests/perf/node-screen-benchmark.html",
"charts/tests/perf/axis-benchmark.js",
"charts/tests/perf/axisredraw-benchmark.js",
"charts/tests/perf/combo-benchmark.js",
"charts/tests/perf/combo-legend-benchmark.js",
"charts/tests/perf/marker-benchmark.js",
"charts/tests/perf/noaxes-benchmark.js",
"charts/tests/perf/noaxes-legend-benchmark.js",
"charts/tests/perf/pie-benchmark.js",
"charts/tests/perf/series-benchmark.js",
"graphics/tests/perf/circle-benchmark.js",
"graphics/tests/perf/circlenofill-benchmark.js",
"graphics/tests/perf/circlenostroke-benchmark.js",
"graphics/tests/perf/ellipse-benchmark.js",
"graphics/tests/perf/ellipsenofill-benchmark.js",
"graphics/tests/perf/ellipsenostroke-benchmark.js",
"graphics/tests/perf/multipleshapes-benchmark.js",
"graphics/tests/perf/multipleshapesnofill-benchmark.js",
"graphics/tests/perf/multipleshapesnostroke-benchmark.js",
"graphics/tests/perf/path-benchmark.js",
"graphics/tests/perf/pathnofill-benchmark.js",
"graphics/tests/perf/pathnostroke-benchmark.js",
"graphics/tests/perf/rect-benchmark.js",
"graphics/tests/perf/rectnofill-benchmark.js",
"graphics/tests/perf/rectnostroke-benchmark.js"
]
73 changes: 21 additions & 52 deletions src/scrollview/tests/benchmark/scrollview-benchmark.js
@@ -1,55 +1,24 @@
YUI.add('scrollview-benchmark', function (Y) {

var suite = Y.BenchmarkSuite = new Benchmark.Suite();

function reset() {
Y.one('#container').empty(true).setHTML('<div id="sv-horiz-content" class="horiz-content yui3-scrollview-loading"><ul><li>1</li><li>2</li><li>3</li><li>4</li></ul></div>');
}


suite.add('Y.ScrollView: Instantiate a bare ScrollView', function () {

reset();

var config = {
id:"svHorizPaged",
srcNode:"#sv-horiz-content",
height:200,
width:300,
flick: {
minDistance: 10,
minVelocity:0.3,
axis:"x"
},
render:true
},
model = new Y.ScrollView(config);
YUI.add('scrollview-benchmark', function (Y, NAME) {

var suite = Y.BenchmarkSuite = new Benchmark.Suite,
container,
scrollview;

container = document.createElement('div')
container.id = "container";
document.body.appendChild(container);

suite.add('ScrollView: Create', function () {
scrollview = new Y.ScrollView({
render: container
});
});


suite.add('Y.ScrollView: Instantiate a paginated ScrollView', function () {

reset();

var config = {
id:"svHorizPaged",
srcNode:"#sv-horiz-content",
height:200,
width:300,
flick: {
minDistance: 10,
minVelocity:0.3,
axis:"x"
},
plugins: [{
fn:Y.Plugin.ScrollViewPaginator,
cfg:{
selector:">ul>li"
}
}],
render:true
},
model = new Y.ScrollView(config);

suite.add('ScrollView: Create & Destroy', function () {
scrollview = new Y.ScrollView({
render: container
});
scrollview.destroy();
});

}, '@VERSION@', {requires: ['scrollview-base', 'scrollview-paginator']});
}, '@VERSION@', {requires: ['scrollview-base']});

0 comments on commit e5d8cea

Please sign in to comment.