Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sequelize-benchmark

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sequelize-benchmark - npm Package Compare versions

Comparing version 0.4.0 to 0.5.1

11

lib/benchmarks/bulkCreate.js

@@ -59,3 +59,3 @@ 'use strict';

defer: true,
name: 'bulkCreate#' + ULTRA_SAMPLE_SIZE,
name: 'inserting ' + ULTRA_SAMPLE_SIZE + ' rows',
fn: function(deferred) {

@@ -70,3 +70,3 @@ models.user.bulkCreate(ultraSample)

defer: true,
name: 'bulkCreate#' + LARGE_SAMPLE_SIZE,
name: 'inserting ' + LARGE_SAMPLE_SIZE + ' rows',
fn: function(deferred) {

@@ -81,3 +81,3 @@ models.user.bulkCreate(largeSample)

defer: true,
name: 'bulkCreate#' + SMALL_SAMPLE_SIZE,
name: 'inserting ' + SMALL_SAMPLE_SIZE + ' rows',
fn: function(deferred) {

@@ -91,5 +91,8 @@ models.user.bulkCreate(smallSample)

// add listeners
.on('start', function(event) {
Utils.log(`Starting ${event.currentTarget.name}`);
})
.on('cycle', function(event) {
Utils.log(String(event.target)
+ ` (mean ${event.target.times.period}s)`
+ ` (mean ${event.target.times.period.toFixed(6)}s)`
);

@@ -96,0 +99,0 @@ })

@@ -74,3 +74,3 @@ 'use strict';

defer: true,
name: 'findAll#' + LARGE_SAMPLE_SIZE,
name: 'finding ' + LARGE_SAMPLE_SIZE + ' rows',
fn: function(deferred) {

@@ -88,7 +88,35 @@ models.user.findAll({

defer: true,
name: 'findAll#' + LARGE_SAMPLE_SIZE + '#include',
name: 'finding(raw) ' + LARGE_SAMPLE_SIZE + ' rows',
fn: function(deferred) {
models.user.findAll({
raw: true,
where: {
username: largeSample
}
}).then(() => {
deferred.resolve();
});
}
})
.add({
defer: true,
name: 'finding(plain) ' + LARGE_SAMPLE_SIZE + ' rows',
fn: function(deferred) {
models.user.findAll({
plain: true,
where: {
username: largeSample
}
}).then(() => {
deferred.resolve();
});
}
})
.add({
defer: true,
name: 'finding ' + LARGE_SAMPLE_SIZE + ' rows with join',
fn: function(deferred) {
models.user.findAll({
where: {
username: largeSample
},

@@ -103,3 +131,3 @@ include: [{model: models.profile, required: true }]

defer: true,
name: 'findAll#' + SMALL_SAMPLE_SIZE,
name: 'finding ' + SMALL_SAMPLE_SIZE + ' rows',
fn: function(deferred) {

@@ -117,7 +145,35 @@ models.user.findAll({

defer: true,
name: 'findAll#' + SMALL_SAMPLE_SIZE + '#include',
name: 'finding(raw) ' + SMALL_SAMPLE_SIZE + ' rows',
fn: function(deferred) {
models.user.findAll({
raw: true,
where: {
username: smallSample
}
}).then(() => {
deferred.resolve();
});
}
})
.add({
defer: true,
name: 'finding(plain) ' + SMALL_SAMPLE_SIZE + ' rows',
fn: function(deferred) {
models.user.findAll({
plain: true,
where: {
username: smallSample
}
}).then(() => {
deferred.resolve();
});
}
})
.add({
defer: true,
name: 'finding ' + SMALL_SAMPLE_SIZE + ' rows with join',
fn: function(deferred) {
models.user.findAll({
where: {
username: smallSample
},

@@ -131,5 +187,8 @@ include: [{model: models.profile, required: true }]

// add listeners
.on('start', function(event) {
Utils.log(`Starting ${event.currentTarget.name}`);
})
.on('cycle', function(event) {
Utils.log(String(event.target)
+ ` (mean ${event.target.times.period}s)`
+ ` (mean ${event.target.times.period.toFixed(6)}s)`
);

@@ -136,0 +195,0 @@ })

{
"name": "sequelize-benchmark",
"version": "0.4.0",
"version": "0.5.1",
"description": "benchmark for sequelize orm",

@@ -35,8 +35,8 @@ "main": "index.js",

"dependencies": {
"benchmark": "^2.1.0",
"benchmark": "^2.1.1",
"debug": "^2.2.0",
"lodash.defaults": "^4.0.1",
"lodash.samplesize": "^4.0.4",
"lodash.defaults": "^4.1.0",
"lodash.samplesize": "^4.1.0",
"microtime": "^2.1.1"
}
}
## Sequelize Benchmark
[![Dependency Status](https://david-dm.org/sushantdhiman/sequelize-benchmark.svg)](https://david-dm.org/sushantdhiman/sequelize-benchmark)
[![npm](https://img.shields.io/npm/v/npm.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/sequelize-benchmark)
[![Dependency Status](https://david-dm.org/sushantdhiman/sequelize-benchmark.svg?style=flat-square)](https://david-dm.org/sushantdhiman/sequelize-benchmark)
[![npm](https://img.shields.io/npm/v/sequelize-benchmark.svg?maxAge=2592000&style=flat-square)](https://www.npmjs.com/package/sequelize-benchmark)
[![npm](https://img.shields.io/npm/dm/sequelize-benchmark.svg?maxAge=2592000&style=flat-square)](https://www.npmjs.com/package/sequelize-benchmark)
Benchmark which is used to measure sequelize performance
<p align="center"><img src="http://i.imgur.com/vSNc49a.png" /></p>
<p align="center"><img src="http://i.imgur.com/KIu67yV.png" /></p>

@@ -9,0 +10,0 @@ ### Config

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc