You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Remove warning about missing hiredis. You probably do want it though.
This commit is contained in:
30
README.md
30
README.md
@@ -14,7 +14,8 @@ official `hiredis` C library, which is non-blocking and fast. To use `hiredis`,
|
||||
|
||||
If `hiredis` is installed, `node_redis` will use it by default.
|
||||
|
||||
## Why?
|
||||
|
||||
## Why so many Redis clients for node?
|
||||
|
||||
`node_redis` works in the latest versions of node, is published in `npm`, is used by many people, and is in production on a
|
||||
number of sites.
|
||||
@@ -23,6 +24,33 @@ number of sites.
|
||||
with recent versions of node.
|
||||
|
||||
|
||||
## Performance
|
||||
|
||||
Here are typical results of `multi_bench.js` which is similar to `redis-benchmark` from the Redis distribution.
|
||||
It uses 50 concurrent connections with no pipelining.
|
||||
|
||||
JavaScript parser:
|
||||
|
||||
PING: 20000 ops 42283.30 ops/sec 0/5/1.182
|
||||
SET: 20000 ops 32948.93 ops/sec 1/7/1.515
|
||||
GET: 20000 ops 28694.40 ops/sec 0/9/1.740
|
||||
INCR: 20000 ops 39370.08 ops/sec 0/8/1.269
|
||||
LPUSH: 20000 ops 36429.87 ops/sec 0/8/1.370
|
||||
LRANGE (10 elements): 20000 ops 9891.20 ops/sec 1/9/5.048
|
||||
LRANGE (100 elements): 20000 ops 1384.56 ops/sec 10/91/36.072
|
||||
|
||||
hiredis parser:
|
||||
|
||||
PING: 20000 ops 46189.38 ops/sec 1/4/1.082
|
||||
SET: 20000 ops 41237.11 ops/sec 0/6/1.210
|
||||
GET: 20000 ops 39682.54 ops/sec 1/7/1.257
|
||||
INCR: 20000 ops 40080.16 ops/sec 0/8/1.242
|
||||
LPUSH: 20000 ops 41152.26 ops/sec 0/3/1.212
|
||||
LRANGE (10 elements): 20000 ops 36563.07 ops/sec 1/8/1.363
|
||||
LRANGE (100 elements): 20000 ops 21834.06 ops/sec 0/9/2.287
|
||||
|
||||
The performance of `node_redis` improves dramatically with pipelining.
|
||||
|
||||
## Usage
|
||||
|
||||
Simple example, included as `example.js`:
|
||||
|
@@ -1,6 +1,10 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
## v0.4.1 - December 8, 2010
|
||||
|
||||
Remove warning about missing hiredis. You probably do want it though.
|
||||
|
||||
## v0.4.0 - December 5, 2010
|
||||
|
||||
Support for multiple response parsers and hiredis C library from Pieter Noordhuis.
|
||||
|
10
index.js
10
index.js
@@ -8,19 +8,21 @@ var net = require("net"),
|
||||
default_port = 6379,
|
||||
default_host = "127.0.0.1";
|
||||
|
||||
// can set this to true to enable for all connections
|
||||
exports.debug_mode = false;
|
||||
|
||||
// hiredis might not be installed
|
||||
try {
|
||||
require("./lib/parser/hiredis");
|
||||
parsers.push(require("./lib/parser/hiredis"));
|
||||
} catch (err) {
|
||||
console.log("hiredis parser not installed.");
|
||||
if (exports.debug_mode) {
|
||||
console.log("hiredis parser not installed.");
|
||||
}
|
||||
}
|
||||
|
||||
parsers.push(require("./lib/parser/javascript"));
|
||||
|
||||
// can set this to true to enable for all connections
|
||||
exports.debug_mode = false;
|
||||
|
||||
function to_array(args) {
|
||||
var len = args.length,
|
||||
arr = new Array(len), i;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{ "name" : "redis",
|
||||
"version" : "0.4.0",
|
||||
"version" : "0.4.1",
|
||||
"description" : "Redis client library",
|
||||
"author": "Matt Ranney <mjr@ranney.com>",
|
||||
"contributors": [
|
||||
|
Reference in New Issue
Block a user