Skip to content

Commit

Permalink
test(skip): add micro perf tests for skip over scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Oct 14, 2015
1 parent c35a120 commit d18e2bc
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions perf/micro/immediate-scheduler/operators/skip-scalar-0.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var RxOld = require('rx');
var RxNew = require('../../../../index');

module.exports = function (suite) {
var oldSkipWithImmediateScheduler = RxOld.Observable.just(50, RxOld.Scheduler.immediate).skip(0);
var newSkipWithImmediateScheduler = RxNew.Observable.of(50).skip(0);

function _next(x) { }
function _error(e) { }
function _complete() { }
return suite
.add('old skip with immediate scheduler', function () {
oldSkipWithImmediateScheduler.subscribe(_next, _error, _complete);
})
.add('new skip with immediate scheduler', function () {
newSkipWithImmediateScheduler.subscribe(_next, _error, _complete);
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var RxOld = require('rx');
var RxNew = require('../../../../index');

module.exports = function (suite) {
var oldSkipWithImmediateScheduler = RxOld.Observable.just(50, RxOld.Scheduler.immediate).skip(25);
var newSkipWithImmediateScheduler = RxNew.Observable.of(50).skip(25);

function _next(x) { }
function _error(e) { }
function _complete() { }
return suite
.add('old skip with immediate scheduler', function () {
oldSkipWithImmediateScheduler.subscribe(_next, _error, _complete);
})
.add('new skip with immediate scheduler', function () {
newSkipWithImmediateScheduler.subscribe(_next, _error, _complete);
});
};

0 comments on commit d18e2bc

Please sign in to comment.