Browse files

Split App's benchmark tests in two

  • Loading branch information...
1 parent 2843ed1 commit 633a31a9f0082112a5b7d8ff34bf5c8e8695a489 @derek committed Mar 28, 2013
View
23 src/app/tests/benchmark/app-benchmark-model.js
@@ -0,0 +1,23 @@
+YUI.add('app-benchmark-model', function (Y, NAME) {
+
+ var suite = Y.Benchmark.suite;
+
+ // -- Y.Model ------------------------------------------------------------------
+ suite.add({
+ Y: Y,
+ name: 'Y.Model: Instantiate a bare model',
+ fn: function () {
+ var model = new Y.Model();
+ }
+ });
+
+ suite.add({
+ Y: Y,
+ name: 'Y.Model: Subclass and instantiate a bare model',
+ fn: function () {
+ var MyModel = Y.Base.create('myModel', Y.Model, []),
+ model = new MyModel();
+ }
+ });
+
+}, '@VERSION@', {requires: ['app']});
View
23 src/app/tests/benchmark/app-benchmark-view.js
@@ -0,0 +1,23 @@
+YUI.add('app-benchmark-view', function (Y, NAME) {
+
+ var suite = Y.Benchmark.suite;
+
+ // -- Y.View -------------------------------------------------------------------
+ suite.add({
+ Y: Y,
+ name: 'Y.View: Instantiate a bare view',
+ fn: function () {
+ var view = new Y.View();
+ }
+ });
+
+ suite.add({
+ Y: Y,
+ name: 'Y.View: Instantiate and subclass a bare view',
+ fn: function () {
+ var MyView = Y.Base.create('myView', Y.View, []),
+ view = new MyView();
+ }
+ });
+
+}, '@VERSION@', {requires: ['app']});
View
3 src/common/tests/performance.json
@@ -1,5 +1,6 @@
[
"scrollview/tests/benchmark/scrollview-benchmark.js",
"base/tests/benchmark/base-benchmark.js",
- "app/tests/benchmark/app-benchmark.js"
+ "app/tests/benchmark/app-benchmark-model.js",
+ "app/tests/benchmark/app-benchmark-view.js"
]

0 comments on commit 633a31a

Please sign in to comment.