Skip to content

Commit

Permalink
Support xsuite and xbenchmark to skip, as well as ssuite and bbenchma…
Browse files Browse the repository at this point in the history
…rk to run only. Related to JamieMason#4 and JamieMason#5
  • Loading branch information
lazd committed Jul 15, 2014
1 parent 8a6a37c commit cfcfe0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/perftacular.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@
* @param {Function} benchmark
* @param {Object} [benchOptions]
*/
queueBenchmarkAdd.skip = noop;
queueBenchmarkAdd.skip = global.xbenchmark = noop;

/*
* Only run this benchmark.
* @param {[type]} benchName
* @param {Function} benchmark
* @param {Object} [benchOptions]
*/
queueBenchmarkAdd.only = function(benchName, benchmark, benchOptions) {
queueBenchmarkAdd.only = global.bbenchmark = function(benchName, benchmark, benchOptions) {
// Add only this benchmark to the queue
queueBenchmarkAdd(benchName, benchmark, benchOptions, true);
};
Expand Down Expand Up @@ -144,7 +144,7 @@
* @param {Object} [suiteOptions]
* @return {Object} suite
*/
global.suite.skip = noop;
global.suite.skip = global.xsuite = noop;

/**
* Only run this suite.
Expand All @@ -153,7 +153,7 @@
* @param {Object} [suiteOptions]
* @return {Object} suite
*/
global.suite.only = function(suiteName, addAllBenchmarksToSuite, suiteOptions) {
global.suite.only = global.ssuite = function(suiteName, addAllBenchmarksToSuite, suiteOptions) {
// Add the suite, mark it as the only suite to run
addSuite(suiteName, addAllBenchmarksToSuite, suiteOptions, true);
};
Expand Down

0 comments on commit cfcfe0d

Please sign in to comment.