Socket
Socket
Sign inDemoInstall

ioredis

Package Overview
Dependencies
Maintainers
1
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ioredis - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

8

benchmarks/single_node.js

@@ -7,2 +7,10 @@ 'use strict';

console.log('==========================');
console.log('ioredis: ' + require('../package.json').version);
console.log('node_redis: ' + require('redis/package.json').version);
var os = require('os');
console.log('CPU: ' + os.cpus().length);
console.log('OS: ' + os.platform() + ' ' + os.arch());
console.log('==========================');
var waitReady = function (next) {

@@ -9,0 +17,0 @@ var pending = 2;

4

Changelog.md

@@ -5,2 +5,6 @@ ## Changelog

### v1.2.1 - May 7, 2015
* Fix `sendCommand` sometimes doesn't return a promise.
### v1.2.0 - May 4, 2015

@@ -7,0 +11,0 @@

9

lib/redis.js

@@ -442,6 +442,8 @@ 'use strict';

if (this.status === 'end') {
return command.reject(new Error('Connection is closed.'));
command.reject(new Error('Connection is closed.'));
return command.promise;
}
if (this.condition.mode.subscriber && !_.includes(Command.FLAGS.VALID_IN_SUBSCRIBER_MODE, command.name)) {
return command.reject(new Error('Connection in subscriber mode, only subscriber commands may be used'));
command.reject(new Error('Connection in subscriber mode, only subscriber commands may be used'));
return command.promise;
}

@@ -462,3 +464,4 @@

if (!writable && !this.options.enableOfflineQueue) {
return command.reject(new Error('Stream isn\'t writeable and enableOfflineQueue options is false'));
command.reject(new Error('Stream isn\'t writeable and enableOfflineQueue options is false'));
return command.promise;
}

@@ -465,0 +468,0 @@

{
"name": "ioredis",
"version": "1.2.0",
"version": "1.2.1",
"description": "A delightful, performance-focused Redis client for Node and io.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -594,21 +594,28 @@ # ioredis

Compares with [node_redis](https://github.com/mranney/node_redis):
Compares with [node_redis](https://github.com/mranney/node_redis) on my laptop(MacBook Pro, Retina, 15-inch, Late 2013):
```shell
> npm run bench
==========================
ioredis: 1.2.0
node_redis: 0.12.1
CPU: 8
OS: darwin x64
==========================
simple set
81,026 op/s » ioredis
43,487 op/s » node_redis
75,846 op/s » ioredis
43,185 op/s » node_redis
simple get
79,565 op/s » ioredis
41,808 op/s » node_redis
75,463 op/s » ioredis
41,240 op/s » node_redis
simple get with pipeline
12,711 op/s » ioredis
4,714 op/s » node_redis
12,329 op/s » ioredis
4,146 op/s » node_redis
lrange 100
61,149 op/s » ioredis
48,827 op/s » node_redis
58,273 op/s » ioredis
45,782 op/s » node_redis

@@ -618,5 +625,6 @@

Benches: 8
Elapsed: 57,882.94 ms
Elapsed: 61,455.94 ms
```
However since there are many factors that can impact the benchmark, results may be different in your server([#25](https://github.com/luin/ioredis/issues/25)).
You can find the code at `benchmarks/*.js` and run it yourself using `npm run bench`.

@@ -623,0 +631,0 @@

Sorry, the diff of this file is not supported yet

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