This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var util = require('util'), | |
| spawn = require('child_process').spawn, | |
| expresso = 'expresso', | |
| async = require('async'); | |
| async.parallel({ | |
| "My Test" : function(cb){ runTest('./test/my_test.js', "My Test", cb) }, | |
| "My Other Test" : function(cb){ runTest('./test/my_other_tests', "My Other Test", cb) }, | |
| },function(errors, results){ | |
| util.print("Tests:\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'redis' | |
| require 'mongo' | |
| require 'benchmark' | |
| class MongoVsRedis | |
| ITERATIONS = 100_000 | |
| MONGO_CRITERIA = {"_id"=>BSON::ObjectId.from_string("4d2fa98a858d68644662156d")} | |
| REDIS_CRITERIA = "benchmark_test" | |
| def initialize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'redis' | |
| require 'digest/sha1' | |
| class RedisKey | |
| def initialize | |
| @redis = Redis.new | |
| end | |
| def surrogate_key(dimension, data) | |
| nk = Digest::SHA1.hexdigest(data) |
NewerOlder