Comparing version 0.1.10 to 0.1.12
@@ -119,2 +119,8 @@ # HIREDIS | ||
**Important:** the current version of hiredis (0.10.0) free's replies when the | ||
asynchronous API is used. This means you should not call `freeReplyObject` when | ||
you use this API. The reply is cleaned up by hiredis _after_ the callback | ||
returns. This behavior will probably change in future releases, so make sure to | ||
keep an eye on the changelog when upgrading (see issue #39). | ||
### Cleaning up | ||
@@ -121,0 +127,0 @@ |
{ | ||
"name": "hiredis", | ||
"description": "Wrapper for reply processing code in hiredis", | ||
"version": "0.1.10", | ||
"version": "0.1.12", | ||
"homepage": "http://github.com/pietern/hiredis-node", | ||
@@ -12,3 +12,3 @@ "author": "Pieter Noordhuis <pcnoordhuis@gmail.com>", | ||
"scripts": { | ||
"preinstall": "node-waf configure build", | ||
"preinstall": "make || gmake", | ||
"test": "node test/reader.js" | ||
@@ -15,0 +15,0 @@ }, |
var hiredis = require("./hiredis"); | ||
var start = new Date; | ||
var parser = new hiredis.Reader({ return_buffers: false }); | ||
var i, j; | ||
var feed = "*10\r\n"; | ||
for (i = 0; i < 10; i++) { | ||
feed += "*10\r\n"; | ||
for (j = 0; j < 10; j++) { | ||
feed += "$10\r\nxxxxxxxxxx\r\n"; | ||
} | ||
} | ||
function go(num) { | ||
var parser = new hiredis.Reader({ return_buffers: true }); | ||
for (i = 0; i < 10000; i++) { | ||
parser.feed(feed); | ||
parser.get(); | ||
var i, j; | ||
var n = 10, m = 0; | ||
var feed = "*" + n + "\r\n"; | ||
for (i = 0; i < n; i++) { | ||
if (m > 1) { | ||
feed += "*" + m + "\r\n"; | ||
for (j = 0; j < m; j++) { | ||
feed += "$10\r\nxxxxxxxxxx\r\n"; | ||
} | ||
} else { | ||
feed += "$10\r\nxxxxxxxxxx\r\n"; | ||
} | ||
} | ||
var t1 = new Date, t2; | ||
for (i = 0; i < num; i++) { | ||
parser.feed(feed); | ||
parser.get(); | ||
} | ||
t2 = new Date; | ||
console.log("" + num + " took: " + (t2-t1) + "ms"); | ||
} | ||
var time = ((new Date)-start); | ||
console.log("Took: " + time); | ||
var stdin = process.openStdin(); | ||
stdin.on('data', function(chunk) { | ||
go(parseInt(chunk)); | ||
}); | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
312
191654
34