Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

benchmarks

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.js

Run every benchmark across every listed version:

npm run benchmark

Select a specific version with either form:

npm run benchmark -- saveSimple.js 8.24.4
MONGOOSE_VERSION=7.8.12 npm run benchmark -- recursiveToObject.js

The 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.4

Browse the stored results with Mongoose Studio:

MONGODB_CONNECTION_STRING=mongodb://127.0.0.1:27017/benchmarks npm run studio

Then 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:public

This writes the generated data to public/data.js and produces a static site in public/.

About

Run benchmarks across multiple versions of Mongoose.js

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages