Permalink
Browse files

[travis] Test more node.js instances

  • Loading branch information...
1 parent 774413c commit b9b0e255330ab2916ba970c8eba5160723b0b2a7 @3rd-Eden committed Mar 14, 2013
Showing with 11 additions and 9 deletions.
  1. +2 −0 .travis.yml
  2. +9 −9 benchmarks/benchmark.js
View
2 .travis.yml
@@ -2,3 +2,5 @@ language: node_js
node_js:
- 0.4
- 0.6
+ - 0.8
+ - 0.10
View
18 benchmarks/benchmark.js
@@ -10,7 +10,7 @@ var benchmark = require('benchmark')
* Different hashring drivers.
*/
var HashRing = require('../')
- , Hash_ring = require('hash_ring')
+// , Hash_ring = require('hash_ring')
, nodes = {'192.168.0.102:11212': 1, '192.168.0.103:11212': 1, '192.168.0.104:11212': 1};
/**
@@ -21,8 +21,8 @@ var logger = new(require('devnull'))({ timestamp: false, namespacing: 0 });
/**
* prebuild hashrings.
*/
-var ring1 = new HashRing(nodes)
- , ring2 = new Hash_ring(nodes);
+var ring1 = new HashRing(nodes);
+ //, ring2 = new Hash_ring(nodes);
/**
* Benchmark the constructing and generating of a hashring.
@@ -31,8 +31,8 @@ var ring1 = new HashRing(nodes)
new benchmark.Suite()
).add('hashring', function(){
var r = new HashRing(nodes);
-}).add('hash_ring', function(){
- var r = new Hash_ring(nodes);
+//}).add('hash_ring', function(){
+// var r = new Hash_ring(nodes);
}).on('cycle', function cycle(e) {
var details = e.target;
@@ -53,8 +53,8 @@ var ring1 = new HashRing(nodes)
new benchmark.Suite()
).add('hashring', function(){
ring1.get('key' + Math.random());
-}).add('hash_ring', function(){
- ring2.getNode('key' + Math.random());
+//}).add('hash_ring', function(){
+// ring2.getNode('key' + Math.random());
}).on('cycle', function cycle(e) {
var details = e.target;
@@ -75,8 +75,8 @@ var ring1 = new HashRing(nodes)
new benchmark.Suite()
).add('hashring', function(){
ring1.get('key');
-}).add('hash_ring', function(){
- ring2.getNode('key');
+//}).add('hash_ring', function(){
+// ring2.getNode('key');
}).on('cycle', function cycle(e) {
var details = e.target;

0 comments on commit b9b0e25

Please sign in to comment.