changed which benchmarks are default

This commit is contained in:
Joshua Thomas Wise
2017-04-12 16:35:55 -04:00
parent 1e05dfb75e
commit 3aa6c5d058
2 changed files with 13 additions and 15 deletions
+2 -4
View File
@@ -31,10 +31,8 @@ var trials;
}());
function getTrials() {
var trials = require('./trials');
var specifiedGroup = trials.hasOwnProperty(process.argv[2]) ? process.argv[2] : '';
var args = process.argv.slice(specifiedGroup ? 3 : 2);
return args.reduce(filterByArgs, trials[specifiedGroup || 'default'].map(addSearchTerms));
if (process.argv.length === 2) {return require('./trials').default.map(addSearchTerms);}
return process.argv.slice(2).reduce(filterByArgs, require('./trials').searchable.map(addSearchTerms));
function addSearchTerms(trial) {
var size = trial.table.toLowerCase().indexOf('large') === -1 ? 'small' : 'large';
+11 -11
View File
@@ -1,6 +1,17 @@
'use strict';
exports.default = [
{type: 'select', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'select-all', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'select-each', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'insert', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = WAL']},
{type: 'insert', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = DELETE']},
{type: 'transaction', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'real-world', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = WAL']},
{type: 'real-world', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = DELETE']}
];
exports.searchable = [
{type: 'select', table: 'allSmall', columns: ['integer']},
{type: 'select', table: 'allSmall', columns: ['real']},
{type: 'select', table: 'allSmall', columns: ['text']},
@@ -45,17 +56,6 @@ exports.default = [
{type: 'transaction', table: 'blobLarge', columns: ['blob']}
];
exports.rows = [
{type: 'select', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'select-all', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'select-each', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'insert', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = WAL']},
{type: 'insert', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = DELETE']},
{type: 'transaction', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul']},
{type: 'real-world', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = WAL']},
{type: 'real-world', table: 'allSmall', columns: ['integer', 'real', 'text', 'nul'], pragma: ['journal_mode = DELETE']}
];
(function () {
var cacheSize = /^(1|true|on|yes)$/i.test(process.env.NO_CACHE) ? 'cache_size = 0' : 'cache_size = -16000';
var trials = [].concat.apply([], Object.keys(exports).map(function (key) {return exports[key];}));