Run benchmarks across multiple versions of Mongoose.js
Run npm install once to install every version listed in mongoose-versions.txt.
Each version is stored independently in .mongoose-versions/<version> and does
not replace another version.
The root package has no runtime dependencies. Mongoose, Mongoose Studio, and
Express are installed in exec/, while the benchmark-specific Mongoose
versions are installed in .mongoose-versions/.
Run a specified benchmark across every listed Mongoose version:
npm run benchmark -- saveSimple.jsRun every benchmark across every listed version:
npm run benchmarkSelect a specific version with either form:
npm run benchmark -- saveSimple.js 8.24.4
MONGOOSE_VERSION=7.8.12 npm run benchmark -- recursiveToObject.jsThe benchmark files use require('mongoose'); the runner sets NODE_PATH to
the selected version's private node_modules directory.
Set MONGODB_CONNECTION_STRING to also upsert the result into the
BenchmarkResult collection, keyed by benchmark name and Mongoose version:
MONGODB_CONNECTION_STRING=mongodb://127.0.0.1:27017/benchmarks \
npm run benchmark -- saveSimple.js 8.24.4Browse the stored results with Mongoose Studio:
MONGODB_CONNECTION_STRING=mongodb://127.0.0.1:27017/benchmarks npm run studioThen open http://localhost:3000/studio. The BenchmarkResult model is
registered automatically.
Build the public benchmark site from the stored results:
MONGODB_CONNECTION_STRING=mongodb://127.0.0.1:27017/benchmarks npm run build:publicThis writes the generated data to public/data.js and produces a static site in public/.