Add Prettier and ESLint tooling (Refs #77)

This commit is contained in:
2026-10-09 15:56:13 -04:00
parent 8ed059b8d3
commit 16469e2d43
711 changed files with 99737 additions and 28286 deletions
+15 -6
View File
@@ -8,7 +8,9 @@ try {
handle.pragma('cache_size = -16384');
handle.exec('CREATE TABLE records(id INTEGER PRIMARY KEY, content BLOB)');
const insert = handle.prepare('INSERT INTO records(content) VALUES(zeroblob(1048576))');
handle.transaction(() => { for (let i = 0; i < 256; i++) insert.run(); })();
handle.transaction(() => {
for (let i = 0; i < 256; i++) insert.run();
})();
handle.pragma('wal_checkpoint(TRUNCATE)');
handle.pragma('shrink_memory');
// Reproduce the dangerous caller settings. The rebuild must override these.
@@ -16,8 +18,15 @@ try {
handle.pragma('cache_size = -131072');
const beforeKiB = process.resourceUsage().maxRSS;
enableIncrementalVacuum(handle);
console.log(JSON.stringify({ beforeKiB, peakKiB: process.resourceUsage().maxRSS,
vacuum: handle.pragma('auto_vacuum', { simple: true }),
integrity: handle.pragma('quick_check', { simple: true }),
rows: handle.prepare('SELECT COUNT(*) n FROM records').get() }));
} finally { handle.close(); }
console.log(
JSON.stringify({
beforeKiB,
peakKiB: process.resourceUsage().maxRSS,
vacuum: handle.pragma('auto_vacuum', { simple: true }),
integrity: handle.pragma('quick_check', { simple: true }),
rows: handle.prepare('SELECT COUNT(*) n FROM records').get()
})
);
} finally {
handle.close();
}