/sequelize-benchmark

Benchmarks for sequelize

Primary LanguageJavaScriptMIT LicenseMIT

Sequelize Benchmark

Dependency Status npm

Benchmark which is used to measure sequelize performance

Config

It support all possible sequelize environment configuration. Following ENV varibales are available generally

`SEQ_USER`, Username for database
`SEQ_PW`, Password for database
`SEQ_DB`, Database name
`SEQ_HOST`, Host addresss
`SEQ_PORT`, Host port
`SEQ_POOL_MAX`, Maximum concurrent connection
`SEQ_POOL_MIN`, Minimum concurrent connection
`DIALECT`, Dialect to use , `mysql` default

`LARGE_SAMPLE_SIZE`, Sample size for large tests
`SMALL_SAMPLE_SIZE`, Sample size for small tests

How to install and use

  # Install sequelize-benchmark globally
  npm install -g sequelize-benchmark

  # Open your local sequelize development path
  cd /path/to/sequelize

  # Run benchmark
  DIALECT=<postgres | mysql | sqlite | mssql > sequelize-benchmark

Using via NPM Link

  # Open your local sequelize development path
  cd /path/to/sequelize

  # Link current repo with sequelize global symlink
  npm link # may be --production as well

  # Clone benchmarking repository via
  git clone https://github.com/sushantdhiman/sequelize-benchmark

  # Open the `sequelize-benchmark` path
  cd /path/to/sequelize-benchmark

  # Install required node modules
  npm install

  # Now use the `sequelize` from your local sequelize repository
  npm link sequelize

  # Run benchmark
  npm run <test-mysql | test-pg | test-sqlite | test-pg-native | test-mssql>

Troubleshooting

ECONNRESET when running mysql benchmark

In case you get ECONNRESET error when starting benchmark, try to increase max_package_size of your mysql server. You can do this with query (it will work till reboot):

SET GLOBAL max_allowed_packet=1073741824;

or by editing mysql configuration.