Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion benchmark/sqlite/sqlite-prepare-select-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ const bench = common.createBenchmark(main, {
'SELECT text_8kb_column FROM foo_large LIMIT 1',
'SELECT text_8kb_column FROM foo_large LIMIT 100',
],
options: ['none', 'readBigInts', 'returnArrays', 'readBigInts|returnArrays'],
});

function main(conf) {
const db = new sqlite.DatabaseSync(':memory:');
const optionsObj = conf.options === 'none' ? {} : conf.options.split('|').reduce((acc, key) => {
acc[key] = true;
return acc;
}, {});

const db = new sqlite.DatabaseSync(':memory:', optionsObj);

// Create only the necessary table for the benchmark type.
// If the statement includes 'foo_large', create the foo_large table; otherwise, create the foo table.
Expand Down
8 changes: 7 additions & 1 deletion benchmark/sqlite/sqlite-prepare-select-get.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ const bench = common.createBenchmark(main, {
'SELECT text_column, integer_column, real_column, blob_column FROM foo LIMIT 1',
'SELECT text_8kb_column FROM foo_large LIMIT 1',
],
options: ['none', 'readBigInts', 'returnArrays', 'readBigInts|returnArrays'],
});

function main(conf) {
const db = new sqlite.DatabaseSync(':memory:');
const optionsObj = conf.options === 'none' ? {} : conf.options.split('|').reduce((acc, key) => {
acc[key] = true;
return acc;
}, {});

const db = new sqlite.DatabaseSync(':memory:', optionsObj);

// Create only the necessary table for the benchmark type.
// If the statement includes 'foo_large', create the foo_large table; otherwise, create the foo table.
Expand Down
Loading