项目作者: sushantdhiman

项目描述 :
Benchmarks for sequelize
高级语言: JavaScript
项目地址: git://github.com/sushantdhiman/sequelize-benchmark.git
创建时间: 2016-05-27T07:27:51Z
项目社区:https://github.com/sushantdhiman/sequelize-benchmark

开源协议:MIT License

下载


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

  1. `SEQ_USER`, Username for database
  2. `SEQ_PW`, Password for database
  3. `SEQ_DB`, Database name
  4. `SEQ_HOST`, Host addresss
  5. `SEQ_PORT`, Host port
  6. `SEQ_POOL_MAX`, Maximum concurrent connection
  7. `SEQ_POOL_MIN`, Minimum concurrent connection
  8. `DIALECT`, Dialect to use , `mysql` default
  9. `LARGE_SAMPLE_SIZE`, Sample size for large tests
  10. `SMALL_SAMPLE_SIZE`, Sample size for small tests

How to install and use

  1. # Install sequelize-benchmark globally
  2. npm install -g sequelize-benchmark
  3. # Open your local sequelize development path
  4. cd /path/to/sequelize
  5. # Run benchmark
  6. DIALECT=<postgres | mysql | sqlite | mssql > sequelize-benchmark
  1. # Open your local sequelize development path
  2. cd /path/to/sequelize
  3. # Link current repo with sequelize global symlink
  4. npm link # may be --production as well
  5. # Clone benchmarking repository via
  6. git clone https://github.com/sushantdhiman/sequelize-benchmark
  7. # Open the `sequelize-benchmark` path
  8. cd /path/to/sequelize-benchmark
  9. # Install required node modules
  10. npm install
  11. # Now use the `sequelize` from your local sequelize repository
  12. npm link sequelize
  13. # Run benchmark
  14. 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):

  1. SET GLOBAL max_allowed_packet=1073741824;

or by editing mysql configuration.