Permalink
Browse files

Contributed changes:

*  Support SlowBuffers (Umair Siddique)
*  Add Multi to exports (Louis-Philippe Perron)
*  Fix for drain event calculation (Vladimir Dronnikov)

Thanks!
  • Loading branch information...
1 parent 4930036 commit 3cc297ada4fc2d0054403ac6882beb345fbccfc2 @mranney mranney committed Jul 6, 2011
Showing with 44 additions and 3 deletions.
  1. +10 −0 changelog.md
  2. +1 −1 examples/backpressure_drain.js
  3. +1 −1 index.js
  4. +1 −1 package.json
  5. +31 −0 tests/buffer_bench.js
View
@@ -1,6 +1,16 @@
Changelog
=========
+## v0.6.5 - July 6, 2011
+
+Contributed changes:
+
+* Support SlowBuffers (Umair Siddique)
+* Add Multi to exports (Louis-Philippe Perron)
+* Fix for drain event calculation (Vladimir Dronnikov)
+
+Thanks!
+
## v0.6.4 - June 30, 2011
Fix bug with optional callbacks for hmset.
@@ -3,7 +3,7 @@ var redis = require("../index"),
command_queue_high_water: 5,
command_queue_low_water: 1
}),
- remaining_ops = 10000, paused = false;
+ remaining_ops = 100000, paused = false;
function op() {
if (remaining_ops <= 0) {
View
@@ -285,7 +285,7 @@ RedisClient.prototype.send_offline_queue = function () {
}
this.offline_queue = new Queue();
// Even though items were shifted off, Queue backing store still uses memory until next add, so just get a new Queue
-
+
if (!buffered_writes) {
this.should_buffer = false;
this.emit("drain");
View
@@ -1,5 +1,5 @@
{ "name" : "redis",
- "version" : "0.6.4",
+ "version" : "0.6.5",
"description" : "Redis client library",
"author": "Matt Ranney <mjr@ranney.com>",
"contributors": [
View
@@ -5,6 +5,37 @@ for (i = 99 ; i >= 0 ; i--) {
source[i] = 120;
}
+var str = "This is a nice String.",
+ buf = new Buffer("This is a lovely Buffer.");
+
+var start = new Date();
+for (i = count * 100; i > 0 ; i--) {
+ if (Buffer.isBuffer(str)) {}
+}
+var end = new Date();
+console.log("Buffer.isBuffer(str) " + (end - start) + " ms");
+
+var start = new Date();
+for (i = count * 100; i > 0 ; i--) {
+ if (Buffer.isBuffer(buf)) {}
+}
+var end = new Date();
+console.log("Buffer.isBuffer(buf) " + (end - start) + " ms");
+
+var start = new Date();
+for (i = count * 100; i > 0 ; i--) {
+ if (str instanceof Buffer) {}
+}
+var end = new Date();
+console.log("str instanceof Buffer " + (end - start) + " ms");
+
+var start = new Date();
+for (i = count * 100; i > 0 ; i--) {
+ if (buf instanceof Buffer) {}
+}
+var end = new Date();
+console.log("buf instanceof Buffer " + (end - start) + " ms");
+
for (i = bytes ; i > 0 ; i --) {
var start = new Date();
for (j = count ; j > 0; j--) {

0 comments on commit 3cc297a

Please sign in to comment.