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:
2026-08-03 12:35:01 +03:00
parent ac464f2b92
commit d4c9b04f21
20 changed files with 129 additions and 129 deletions

View File

@@ -1,6 +1,6 @@
# End-to-end tests with the official MongoDB Node.js driver
These exercise mongo-lite from a real driver over TCP: full CRUD, query
These exercise MultiforaDB from a real driver over TCP: full CRUD, query
operators, aggregation, error codes, concurrent clients, crash recovery, and
the whole lifecycle including server restarts.
@@ -18,7 +18,7 @@ Most suites expect a server running on port 27020:
```sh
zig build
zig-out/bin/mongo-lite --port 27020 --db /tmp/ml-e2e.log --ttl-sweep-secs 1 &
zig-out/bin/multiforadb --port 27020 --db /tmp/mfdb-e2e.log --ttl-sweep-secs 1 &
node tests/e2e/e2e.js # CRUD + operators + aggregate + errors (29 checks)
node tests/e2e/e2e2.js concurrent # 8 clients: 4 writers + 4 readers (2 checks)
@@ -43,7 +43,7 @@ E2E6_PORT=27300 node tests/e2e/e2e6.js # different port if 27220 is taken
Rebuild with `zig build` after any change under `src/` before restarting the
server: `zig build test` compiles the test binary only and leaves
`zig-out/bin/mongo-lite` stale, so the suites keep running against the old
`zig-out/bin/multiforadb` stale, so the suites keep running against the old
rules and report failures that the source no longer explains.
`e2e2.js concurrent` is safe to repeat against a running server (it drops its
@@ -92,9 +92,9 @@ Measured behavior (all documented in the top-level README):
bash tests/e2e/compare-run.sh [size] [doc-size] # e.g. 1g 16k
```
Starts mongod (`brew install mongodb-community`) on :27018 and mongo-lite
Starts mongod (`brew install mongodb-community`) on :27018 and MultiforaDB
on :27019, runs the same driver workload against each (durable writes:
mongo-lite fsyncs per command, mongod runs with `j: true`), measures kill -9
MultiforaDB fsyncs per command, mongod runs with `j: true`), measures kill -9
reopen for both, and prints a side-by-side table. `compare.js` alone runs
one side (see its `--help`-style header comment).
@@ -109,7 +109,7 @@ comparison (`concurrent.js`, N clients each doing sequential `insertOne`
with `{w:1, j:true}` — the group-commit path under real contention), then
writes a machine-readable, versioned report to
`tests/e2e/results/bench-<timestamp>.txt` and prints a diff of the
mongo-lite numbers against the previous run (`results/bench-latest.txt`).
MultiforaDB numbers against the previous run (`results/bench-latest.txt`).
The report has `[main]` / `[concurrency]` / `[meta]` sections with
`name<TAB>value` rows; `bench-run.sh 1g 16k` reproduces the phase8 gate
(see `results/phase8.txt`).

View File

@@ -4,10 +4,10 @@
# bash tests/e2e/bench-run.sh [size] [doc-size] [clients...]
# (defaults: 1g, 16k, "1 4 8 16 32"; clients apply to the concurrent phase)
#
# Runs the compare-run.sh main suite (mongo-lite vs mongod, same driver,
# Runs the compare-run.sh main suite (multiforadb vs mongod, same driver,
# durable writes) plus the concurrent durable-write comparison, then writes
# a versioned machine-readable report to tests/e2e/results/ and prints a
# diff of the mongo-lite numbers against the previous run.
# diff of the multiforadb numbers against the previous run.
set -u
cd "$(dirname "$0")/../.."
SIZE="${1:-1g}"; DOC="${2:-16k}"; CLIENTS="${3:-1 4 8 16 32}"
@@ -35,8 +35,8 @@ echo "### concurrent durable insertOne (clients: $CLIENTS)" >&2
rm -rf "$TMP/mongod" && mkdir -p "$TMP/mongod"
mongod --dbpath "$TMP/mongod" --port 27018 --bind_ip 127.0.0.1 --quiet >"$TMP/md.out" 2>&1 &
MD_PID=$!
./zig-out/bin/mongo-lite --port 27019 --db "$TMP/ml.log" --compact-threshold 1g >"$TMP/ml.out" 2>&1 &
ML_PID=$!
./zig-out/bin/multiforadb --port 27019 --db "$TMP/mfdb.log" --compact-threshold 1g >"$TMP/mfdb.out" 2>&1 &
MFDB_PID=$!
# Poll both servers with the real driver until they answer (fresh mongod
# dbpaths can take several seconds; a fixed sleep is flaky).
wait_ready() { # $1 = url
@@ -47,25 +47,25 @@ wait_ready() { # $1 = url
done
return 1
}
wait_ready mongodb://127.0.0.1:27018 || { echo "mongod never became ready" >&2; kill -9 $MD_PID $ML_PID 2>/dev/null; exit 1; }
wait_ready mongodb://127.0.0.1:27019 || { echo "mongo-lite never became ready" >&2; kill -9 $MD_PID $ML_PID 2>/dev/null; exit 1; }
wait_ready mongodb://127.0.0.1:27018 || { echo "mongod never became ready" >&2; kill -9 $MD_PID $MFDB_PID 2>/dev/null; exit 1; }
wait_ready mongodb://127.0.0.1:27019 || { echo "multiforadb never became ready" >&2; kill -9 $MD_PID $MFDB_PID 2>/dev/null; exit 1; }
CC="$TMP/cc.txt"
for C in $CLIENTS; do
MD=$(node tests/e2e/concurrent.js --url mongodb://127.0.0.1:27018 --label mongodb --clients "$C" --per-client "$PER_CLIENT" 2>/dev/null | tail -1)
ML=$(node tests/e2e/concurrent.js --url mongodb://127.0.0.1:27019 --label mongo-lite --clients "$C" --per-client "$PER_CLIENT" 2>/dev/null | tail -1)
ML_D=$(echo "$ML" | sed -E 's/.*\t([0-9.]+) docs\/s.*/\1/')
MFDB=$(node tests/e2e/concurrent.js --url mongodb://127.0.0.1:27019 --label multiforadb --clients "$C" --per-client "$PER_CLIENT" 2>/dev/null | tail -1)
MFDB_D=$(echo "$MFDB" | sed -E 's/.*\t([0-9.]+) docs\/s.*/\1/')
MD_D=$(echo "$MD" | sed -E 's/.*\t([0-9.]+) docs\/s.*/\1/')
if [ -z "$ML_D" ] || [ -z "$MD_D" ]; then
echo "WARNING: concurrent run at $C clients produced no result (ml='$ML' md='$MD')" >&2
if [ -z "$MFDB_D" ] || [ -z "$MD_D" ]; then
echo "WARNING: concurrent run at $C clients produced no result (mfdb='$MFDB' md='$MD')" >&2
fi
RATIO=$(node -e "const m=Number('$ML_D'),d=Number('$MD_D');console.log(d>0?(m/d).toFixed(1)+'x':'—')")
echo "clients $C $ML_D $MD_D $RATIO" | tee -a "$CC"
RATIO=$(node -e "const m=Number('$MFDB_D'),d=Number('$MD_D');console.log(d>0?(m/d).toFixed(1)+'x':'—')")
echo "clients $C $MFDB_D $MD_D $RATIO" | tee -a "$CC"
done
kill -9 $MD_PID $ML_PID 2>/dev/null; wait 2>/dev/null
kill -9 $MD_PID $MFDB_PID 2>/dev/null; wait 2>/dev/null
# ---- assemble the report --------------------------------------------------
{
echo "# mongo-lite vs MongoDB benchmark"
echo "# multiforadb vs MongoDB benchmark"
echo "# date: $(date -u +%Y-%m-%dT%H:%M:%SZ) git: $REV$DIRTY"
echo "# args: size=$SIZE doc-size=$DOC wc=j clients=$CLIENTS per-client=$PER_CLIENT"
echo "# reproduce: bash tests/e2e/bench-run.sh $SIZE $DOC \"$CLIENTS\""
@@ -81,7 +81,7 @@ kill -9 $MD_PID $ML_PID 2>/dev/null; wait 2>/dev/null
}
return m;
};
const a = read("/tmp/mongo-cmp/ml-report.txt");
const a = read("/tmp/mongo-cmp/mfdb-report.txt");
const b = read("/tmp/mongo-cmp/mongo-report.txt");
const keys = ["insertOne (sequential) ×200","bulk insert throughput","docs loaded","createIndex({k: 1})",
"countDocuments({})","findOne({_id: <ObjectId>})","findOne({k: 500}) (indexed)","find({p: {$gte,$lt}}).count() (scan)",
@@ -104,7 +104,7 @@ kill -9 $MD_PID $ML_PID 2>/dev/null; wait 2>/dev/null
# ---- diff against the previous run ---------------------------------------
echo "report: $REPORT"
if [ -f "$LATEST" ]; then
echo; echo "### mongo-lite numbers vs previous run ($(head -2 "$LATEST" | tail -1 | sed 's/# //'))"
echo; echo "### multiforadb numbers vs previous run ($(head -2 "$LATEST" | tail -1 | sed 's/# //'))"
node -e '
const fs = require("fs");
const old = fs.readFileSync(process.argv[1], "utf8");
@@ -136,9 +136,9 @@ if [ -f "$LATEST" ]; then
const d = isFinite(num(ov)) && isFinite(num(v)) && num(ov) > 0 ? ((num(v) - num(ov)) / num(ov) * 100).toFixed(0) + "%" : "";
console.log(k.padEnd(42) + fmt(ov) + fmt(v) + d);
}
// concurrency (mongo-lite docs/s per client count)
// concurrency (multiforadb docs/s per client count)
const oc = section(old, "concurrency"), nc = section(neu, "concurrency");
console.log("\nconcurrency — mongo-lite docs/s:");
console.log("\nconcurrency — multiforadb docs/s:");
for (const [k, v] of nc) {
const ov = oc.get(k);
const d = ov && Number(ov) > 0 ? ((Number(v) - Number(ov)) / Number(ov) * 100).toFixed(0) + "%" : "";

View File

@@ -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`);

View File

@@ -1,26 +1,26 @@
#!/bin/bash
# Compare mongo-lite against a real MongoDB with the same workload, same driver.
# Compare multiforadb against a real MongoDB with the same workload, same driver.
#
# bash tests/e2e/compare-run.sh [size] [doc-size]
# (defaults: 1g, 16k)
#
# Starts mongod on :27018 and mongo-lite on :27019, runs compare.js against
# each (durable writes: mongo-lite fsyncs per doc, mongod ack'd with j:true),
# Starts mongod on :27018 and multiforadb on :27019, runs compare.js against
# each (durable writes: multiforadb fsyncs per doc, mongod ack'd with j:true),
# measures kill -9 reopen time for both, and prints a side-by-side table.
set -u
cd "$(dirname "$0")/../.."
SIZE="${1:-1g}"
DOC="${2:-16k}"
echo "comparing mongo-lite vs mongodb — dataset ${SIZE}, docs ~${DOC}"
echo "comparing multiforadb vs mongodb — dataset ${SIZE}, docs ~${DOC}"
CMPDIR=/tmp/mongo-cmp
mkdir -p "$CMPDIR/mongod"
ML_LOG="$CMPDIR/ml.log"
ML_OUT="$CMPDIR/ml-srv.out"
MFDB_LOG="$CMPDIR/mfdb.log"
MFDB_OUT="$CMPDIR/mfdb-srv.out"
MD_OUT="$CMPDIR/md-srv.out"
ML_PORT=27019
MFDB_PORT=27019
MD_PORT=27018
rm -f "$ML_LOG"
rm -f "$MFDB_LOG"
rm -rf "$CMPDIR/mongod" && mkdir -p "$CMPDIR/mongod"
# ---- MongoDB -------------------------------------------------------------
@@ -60,26 +60,26 @@ setTimeout(poll, 300);
')
kill -9 $MD_PID 2>/dev/null
# ---- mongo-lite ----------------------------------------------------------
echo; echo "### mongo-lite (recommended config: --compact-threshold 1g)"
# ---- multiforadb ----------------------------------------------------------
echo; echo "### multiforadb (recommended config: --compact-threshold 1g)"
# Debug is ~10-200x slower (see the README's perf section) — the comparison
# must use the optimized build.
zig build -Doptimize=ReleaseFast 2>&1 | grep -c "^error" | grep -q "^0" || { echo "build failed"; exit 1; }
./zig-out/bin/mongo-lite --port $ML_PORT --db "$ML_LOG" --compact-threshold 1g >"$ML_OUT" 2>&1 &
ML_PID=$!
wait_ready "mongodb://127.0.0.1:$ML_PORT" || { echo "mongo-lite never became ready" >&2; exit 1; }
node tests/e2e/compare.js --url "mongodb://127.0.0.1:$ML_PORT" --label mongo-lite --size "$SIZE" --doc-size "$DOC" \
> "$CMPDIR/ml-report.txt" 2>&1 || { echo "mongo-lite bench failed:"; tail -5 "$CMPDIR/ml-report.txt"; }
ML_RSS=$(ps -o rss= -p $ML_PID | awk '{printf "%.0f", $1/1024}')
ML_DISK=$(du -sm "$ML_LOG" | awk '{print $1}')
./zig-out/bin/multiforadb --port $MFDB_PORT --db "$MFDB_LOG" --compact-threshold 1g >"$MFDB_OUT" 2>&1 &
MFDB_PID=$!
wait_ready "mongodb://127.0.0.1:$MFDB_PORT" || { echo "multiforadb never became ready" >&2; exit 1; }
node tests/e2e/compare.js --url "mongodb://127.0.0.1:$MFDB_PORT" --label multiforadb --size "$SIZE" --doc-size "$DOC" \
> "$CMPDIR/mfdb-report.txt" 2>&1 || { echo "multiforadb bench failed:"; tail -5 "$CMPDIR/mfdb-report.txt"; }
MFDB_RSS=$(ps -o rss= -p $MFDB_PID | awk '{printf "%.0f", $1/1024}')
MFDB_DISK=$(du -sm "$MFDB_LOG" | awk '{print $1}')
echo; echo "### mongo-lite kill -9 + reopen (replay)"
kill -9 $ML_PID; wait $ML_PID 2>/dev/null
ML_REOPEN=$(cd tests/e2e && node -e '
echo; echo "### multiforadb kill -9 + reopen (replay)"
kill -9 $MFDB_PID; wait $MFDB_PID 2>/dev/null
MFDB_REOPEN=$(cd tests/e2e && node -e '
const { spawn } = require("child_process");
const { MongoClient } = require("mongodb");
const t0 = Date.now();
const p = spawn("/Users/shkmv/workspace/sandbox/mongo-lite/zig-out/bin/mongo-lite", ["--port","27019","--db","/tmp/mongo-cmp/ml.log","--compact-threshold","1g"], {stdio:"ignore"});
const p = spawn("../../zig-out/bin/multiforadb", ["--port","27019","--db","/tmp/mongo-cmp/mfdb.log","--compact-threshold","1g"], {stdio:"ignore"});
const poll = async () => {
const c = new MongoClient("mongodb://127.0.0.1:27019", {serverSelectionTimeoutMS: 800});
try { await c.connect(); await c.db("admin").command({ping:1}); await c.close(); p.kill("SIGKILL"); console.log(((Date.now()-t0)/1000).toFixed(1)); }
@@ -87,12 +87,12 @@ const poll = async () => {
};
setTimeout(poll, 300);
')
kill -9 $ML_PID 2>/dev/null
kill -9 $MFDB_PID 2>/dev/null
# ---- side by side ----------------------------------------------------------
echo; echo "### side by side — ${SIZE} dataset, ~${DOC} docs"
cat > "$CMPDIR/meta.json" <<EOF
{"ml_rss_mb": "$ML_RSS", "md_rss_mb": "$MD_RSS", "ml_reopen": "${ML_REOPEN}s", "md_reopen": "${MD_REOPEN}s", "ml_disk_mb": "${ML_DISK}MB", "md_disk_mb": "${MD_DISK}MB"}
{"mfdb_rss_mb": "$MFDB_RSS", "md_rss_mb": "$MD_RSS", "mfdb_reopen": "${MFDB_REOPEN}s", "md_reopen": "${MD_REOPEN}s", "mfdb_disk_mb": "${MFDB_DISK}MB", "md_disk_mb": "${MD_DISK}MB"}
EOF
node -e '
const fs = require("fs");
@@ -105,7 +105,7 @@ const read = (p) => {
}
return m;
};
const a = read("/tmp/mongo-cmp/ml-report.txt");
const a = read("/tmp/mongo-cmp/mfdb-report.txt");
const b = read("/tmp/mongo-cmp/mongo-report.txt");
const meta = JSON.parse(fs.readFileSync("/tmp/mongo-cmp/meta.json", "utf8"));
const keys = ["insertOne (sequential) ×200","bulk insert throughput","docs loaded","createIndex({k: 1})",
@@ -113,17 +113,17 @@ const keys = ["insertOne (sequential) ×200","bulk insert throughput","docs load
"find({}).sort({_id:-1}).limit(20)","find({}, {proj}).limit(1000)","aggregate $group by k",
"updateOne({_id}) ×50","updateMany({k: 7}, {$inc})","deleteOne({_id}) + insertOne","node client RSS"];
const col = (v) => String(v).padEnd(22);
console.log(`${"benchmark".padEnd(42)} ${col("mongo-lite")} ${col("mongodb")} ratio`);
console.log(`${"benchmark".padEnd(42)} ${col("multiforadb")} ${col("mongodb")} ratio`);
for (const k of keys) {
const av = a[k] || "—", bv = b[k] || "—";
const ar = parseFloat(av), br = parseFloat(bv);
const ratio = isFinite(ar) && isFinite(br) && ar > 0 && br > 0 ? (ar / br).toFixed(1) + "x" : "";
console.log(`${k.padEnd(42)} ${col(av)} ${col(bv)} ${ratio}`);
}
console.log(`${`server RSS`.padEnd(42)} ${col(meta.ml_rss_mb + " MB")} ${col(meta.md_rss_mb + " MB")}`);
console.log(`${`kill -9 reopen`.padEnd(42)} ${col(meta.ml_reopen)} ${col(meta.md_reopen)}`);
console.log(`${`db on disk`.padEnd(42)} ${col(meta.ml_disk_mb)} ${col(meta.md_disk_mb)}`);
console.log(`${`server RSS`.padEnd(42)} ${col(meta.mfdb_rss_mb + " MB")} ${col(meta.md_rss_mb + " MB")}`);
console.log(`${`kill -9 reopen`.padEnd(42)} ${col(meta.mfdb_reopen)} ${col(meta.md_reopen)}`);
console.log(`${`db on disk`.padEnd(42)} ${col(meta.mfdb_disk_mb)} ${col(meta.md_disk_mb)}`);
'
pkill -9 -f "mongo-lite --port $ML_PORT" 2>/dev/null
echo; echo "done — reports: $CMPDIR/ml-report.txt, $CMPDIR/mongo-report.txt"
pkill -9 -f "multiforadb --port $MFDB_PORT" 2>/dev/null
echo; echo "done — reports: $CMPDIR/mfdb-report.txt, $CMPDIR/mongo-report.txt"

View File

@@ -1,8 +1,8 @@
// Benchmark: the same workload through the official driver against mongo-lite
// Benchmark: the same workload through the official driver against multiforadb
// and a real MongoDB. Run once per server URL, then diff the reports.
//
// node tests/e2e/compare.js --url mongodb://127.0.0.1:27018 --label mongodb
// node tests/e2e/compare.js --url mongodb://127.0.0.1:27019 --label mongo-lite
// node tests/e2e/compare.js --url mongodb://127.0.0.1:27019 --label multiforadb
//
// Options:
// --url <u> server URL (required)
@@ -12,11 +12,11 @@
// --batch <n> docs per insertMany (default 500)
// --index <field> field to index before the op benchmarks (default k)
// --wc <j|none> write concern: 'j' = {w:1, j:true} durable ack on every
// write (fair vs mongo-lite's fsync-per-write); 'none' =
// write (fair vs multiforadb's fsync-per-write); 'none' =
// driver default (default j)
//
// Every benchmark is awaited (no fire-and-forget), which is exactly how the
// big.js harness measures mongo-lite, so the numbers are directly comparable.
// big.js harness measures multiforadb, so the numbers are directly comparable.
const { MongoClient, ObjectId } = require('mongodb');
const fs = require('fs');
const os = require('os');
@@ -118,7 +118,7 @@ async function main() {
try { collInfo = await db.command({ collStats: 'items' }); } catch {}
if (collInfo) row('server-side data size', fmt(collInfo.size ?? 0), `storage ${fmt(collInfo.storageSize ?? 0)}`);
// ---- secondary index (mongo-lite: planner uses it; mongodb: normal) ------
// ---- secondary index (multiforadb: planner uses it; mongodb: normal) ------
if (opt.index) {
await bench(`createIndex({${opt.index}: 1})`, async () => { await coll.createIndex({ [opt.index]: 1 }); });
}

View File

@@ -2,7 +2,7 @@
// insertOne ({w:1, j:true} by default) into their own collection, reporting
// aggregate docs/s. Exercises the group-commit path under real contention.
//
// node tests/e2e/concurrent.js --url mongodb://127.0.0.1:27019 --label mongo-lite
// node tests/e2e/concurrent.js --url mongodb://127.0.0.1:27019 --label multiforadb
// [--clients 8] [--per-client 2000] [--wc j|none]
//
// Output (stdout, tab-separated, one line):

View File

@@ -1,4 +1,4 @@
// End-to-end test: official MongoDB Node.js driver against mongo-lite.
// End-to-end test: official MongoDB Node.js driver against multiforadb.
const { MongoClient, ObjectId } = require('mongodb');
const URL = 'mongodb://127.0.0.1:27020';

View File

@@ -4,7 +4,7 @@
// server must reject with CannotCreateIndex (67).
//
// The server must run with a short sweep interval, e.g.
// zig-out/bin/mongo-lite --port 27020 --db /tmp/ml-e2e.log --ttl-sweep-secs 1
// zig-out/bin/multiforadb --port 27020 --db /tmp/mfdb-e2e.log --ttl-sweep-secs 1
const { MongoClient } = require('mongodb');
const URL = 'mongodb://127.0.0.1:27020';

View File

@@ -1,6 +1,6 @@
// E2E part 6: the full lifecycle, self-contained.
//
// Spawns its own mongo-lite server on a fresh log file and drives the whole
// Spawns its own multiforadb server on a fresh log file and drives the whole
// feature surface through the official driver: CRUD + query operators +
// aggregation + error codes + secondary indexes + TTL expiry + admin
// commands, then restarts the server twice — once gracefully, once with
@@ -12,7 +12,7 @@
// node tests/e2e/e2e6.js
//
// Env: E2E6_PORT listen port (default 27220)
// ML_BIN server binary (default ../../zig-out/bin/mongo-lite)
// MFDB_BIN server binary (default ../../zig-out/bin/multiforadb)
// E2E6_KEEP keep the log file after the run
const { MongoClient, ObjectId } = require('mongodb');
const { spawn } = require('child_process');
@@ -20,7 +20,7 @@ const fs = require('fs');
const path = require('path');
const PORT = Number(process.env.E2E6_PORT || 27220);
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 DBFILE = process.env.E2E6_DB || path.resolve(__dirname, '../../.zig-cache/e2e6-full.log');
const URL = `mongodb://127.0.0.1:${PORT}`;

View File

@@ -1,7 +1,7 @@
{
"name": "e2e",
"version": "1.0.0",
"description": "These exercise mongo-lite from a real driver over TCP: full CRUD, query operators, aggregation, error codes, concurrent clients, and crash recovery.",
"description": "These exercise multiforadb from a real driver over TCP: full CRUD, query operators, aggregation, error codes, concurrent clients, and crash recovery.",
"main": "e2e.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"