Browse Source

update sort order and fix mongo findOne call

Patrick Falls 12 years ago
parent
commit
b04ba40d7e
2 changed files with 3 additions and 3 deletions
  1. 2 2
      ringojs/benchmark_config
  2. 1 1
      ringojs/ringo-main.js

+ 2 - 2
ringojs/benchmark_config

@@ -13,14 +13,14 @@
       "query_url": "/db?queries=",
       "fortune_url": "/fortune",
       "port": 8080,
-      "sort": 73
+      "sort": 74
     },
     "mongodb": {
       "setup_file": "setup",
       "db_url": "/mongodb",
       "query_url": "/mongodb?queries=",
       "port": 8080,
-      "sort": 74
+      "sort": 116
     }
   }]
 }

+ 1 - 1
ringojs/ringo-main.js

@@ -87,7 +87,7 @@ exports.app = function(req) {
       var randId, world;
       for (var i = 0; i < queryCount; i++) {
          randId = ((Math.random() * 10000) | 0) + 1;
-         world = col.findOne(randId);
+         world = col.findOne({id: randId});
          body.push(world ? world.data : "Record not found for id#" + randId);
       }
       return {