rename project to MultiforaDB
Prose and benchmark tables use MultiforaDB; the binary, the CLI usage line, the log-message prefix and the default database file use multiforadb. Two consequences worth noting: - build.zig.zon's fingerprint is derived from the package name, so it had to change with it (Zig refuses to build otherwise). A consumer pinning this package by fingerprint needs updating. - the default --db path is now multiforadb.log, and getCmdLineOpts reports it as dbpath. An existing mongo-lite.log has to be passed explicitly with --db. The e2e harness abbreviated the old name as ML_; that is now MFDB_, including the documented ML_BIN override (MFDB_BIN) and the scratch file names. MD_ (mongod) is untouched. compare-run.sh spawned the server by absolute path under a sandbox/mongo-lite directory that no longer exists; that block already runs from tests/e2e, so it uses a relative path now. The archived reports under tests/e2e/results/ keep the old name: they record what the old binary measured.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Big-collection harness: how mongo-lite behaves with multi-GB collections.
|
||||
// Big-collection harness: how multiforadb behaves with multi-GB collections.
|
||||
//
|
||||
// Spawns its own server, bulk-inserts up to ~5 GB of documents, measures
|
||||
// insert throughput, log/compaction behavior and server RSS, benchmarks
|
||||
@@ -22,14 +22,14 @@
|
||||
// --keep keep the db file after the run
|
||||
// --quick tiny run (256m, 16k docs)
|
||||
//
|
||||
// Env: ML_BIN server binary (default ../../zig-out/bin/mongo-lite)
|
||||
// Env: MFDB_BIN server binary (default ../../zig-out/bin/multiforadb)
|
||||
// BIG_DB db file path (default .zig-cache/big.log)
|
||||
const { MongoClient } = require('mongodb');
|
||||
const { spawn } = require('child_process');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const BIN = process.env.ML_BIN || path.resolve(__dirname, '../../zig-out/bin/mongo-lite');
|
||||
const BIN = process.env.MFDB_BIN || path.resolve(__dirname, '../../zig-out/bin/multiforadb');
|
||||
const PORT = Number(process.env.BIG_PORT || 27221);
|
||||
const DBFILE = process.env.BIG_DB || path.resolve(__dirname, '../../.zig-cache/big.log');
|
||||
const URL = `mongodb://127.0.0.1:${PORT}`;
|
||||
@@ -137,7 +137,7 @@ async function main() {
|
||||
}
|
||||
fs.rmSync(DBFILE, { force: true });
|
||||
const fmt = (n) => (n >= 1e9 ? (n / 1e9).toFixed(2) + ' GB' : n >= 1e6 ? (n / 1e6).toFixed(1) + ' MB' : n >= 1e3 ? (n / 1e3).toFixed(1) + ' KB' : n + ' B');
|
||||
console.log(`mongo-lite big-collection harness`);
|
||||
console.log(`multiforadb big-collection harness`);
|
||||
console.log(` size ${fmt(SIZE)} · doc ~${fmt(DOC_SIZE)} · batch ${opt.batch} · index ${opt.index || 'none'} · ids ${opt.oid ? 'ObjectId' : 'int'} · compact-threshold ${opt.compactThreshold || '16m'} · db ${DBFILE}`);
|
||||
|
||||
console.log('\n== server start (fresh log) ==');
|
||||
@@ -331,7 +331,7 @@ async function main() {
|
||||
await stopServer('SIGKILL');
|
||||
|
||||
console.log('\n== summary ==');
|
||||
console.log(` mongo-lite handles a ${fmt(bytes)} collection fully in RAM (RSS ${peakRss} MB)`);
|
||||
console.log(` multiforadb handles a ${fmt(bytes)} collection fully in RAM (RSS ${peakRss} MB)`);
|
||||
console.log(` insert: ${(bytes / 1e6 / (insertMs / 1000)).toFixed(1)} MB/s — fsync per write is by design (crash safety)`);
|
||||
if (compactions > 0) {
|
||||
console.log(` ${compactions} compaction rewrites observed: every 16MB of writes rewrites the whole log — for multi-GB loads the cumulative rewrite traffic dominates`);
|
||||
|
||||
Reference in New Issue
Block a user