From cfcfe0dbfaa983f20ab0bc2b64871f70162b13bd Mon Sep 17 00:00:00 2001 From: Larry Davis Date: Tue, 15 Jul 2014 09:50:57 +0200 Subject: [PATCH] Support xsuite and xbenchmark to skip, as well as ssuite and bbenchmark to run only. Related to #4 and #5 --- lib/perftacular.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/perftacular.js b/lib/perftacular.js index 735414f..582607a 100644 --- a/lib/perftacular.js +++ b/lib/perftacular.js @@ -101,7 +101,7 @@ * @param {Function} benchmark * @param {Object} [benchOptions] */ - queueBenchmarkAdd.skip = noop; + queueBenchmarkAdd.skip = global.xbenchmark = noop; /* * Only run this benchmark. @@ -109,7 +109,7 @@ * @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); }; @@ -144,7 +144,7 @@ * @param {Object} [suiteOptions] * @return {Object} suite */ - global.suite.skip = noop; + global.suite.skip = global.xsuite = noop; /** * Only run this suite. @@ -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); };