diff --git a/benchmarks/benchjs/casting.js b/benchmarks/benchjs/casting.js index d5ca05d0141..1b9b3dbeb91 100644 --- a/benchmarks/benchjs/casting.js +++ b/benchmarks/benchjs/casting.js @@ -136,6 +136,6 @@ suite.add('Casting - Embedded Docs - 0 Docs', { out.ops = item.hz; outObj[item.name.replace(/\s/g, '')] = out; }); - console.log(JSON.stringify(outObj)); + console.dir(outObj, {depth: null, colors: true}); } }).run({async: true}); diff --git a/benchmarks/benchjs/delete.js b/benchmarks/benchjs/delete.js index 028ac6b34e7..3791ad3a5ad 100644 --- a/benchmarks/benchjs/delete.js +++ b/benchmarks/benchjs/delete.js @@ -61,7 +61,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { nData.likes = data.likes; nData.address = data.address; user.insert(nData, function(err, res) { - dIds.push(res[0]._id); + dIds.push(res.insertedIds[0]); --count || next(); }); } @@ -120,7 +120,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { out.ops = item.hz; outObj[item.name.replace(/\s/g, '')] = out; }); - console.log(JSON.stringify(outObj)); + console.dir(outObj, {depth: null, colors: true}); } }); function next() { diff --git a/benchmarks/benchjs/insert.js b/benchmarks/benchjs/insert.js index b2d257880b0..a8c15117304 100644 --- a/benchmarks/benchjs/insert.js +++ b/benchmarks/benchjs/insert.js @@ -169,7 +169,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { out.ops = item.hz; outObj[item.name.replace(/\s/g, '')] = out; }); - console.log(JSON.stringify(outObj)); + console.dir(outObj, {depth: null, colors: true}); } }).run({async: true}); }); diff --git a/benchmarks/benchjs/multiop.js b/benchmarks/benchjs/multiop.js index 8b121a19391..79fc73d38f7 100644 --- a/benchmarks/benchjs/multiop.js +++ b/benchmarks/benchjs/multiop.js @@ -126,7 +126,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { if (err) { throw err; } - dIds.push(res[0]._id); + dIds.push(res.insertedIds[0]); --count || next(); }); BlogPost.create(blogData, function(err, bp) { @@ -142,7 +142,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { if (err) { throw err; } - bdIds.push(res[0]._id); + bdIds.push(res.insertedIds[0]); --count || next(); }); } @@ -447,7 +447,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { out.ops = item.hz; outObj[item.name.replace(/\s/g, '')] = out; }); - console.log(JSON.stringify(outObj)); + console.dir(outObj, {depth: null, colors: true}); } }); function next() { diff --git a/benchmarks/benchjs/population.js b/benchmarks/benchjs/population.js index d7b7cb7608b..5942c8ac9f1 100644 --- a/benchmarks/benchjs/population.js +++ b/benchmarks/benchjs/population.js @@ -387,7 +387,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench-pop', function(err) { out.ops = item.hz; outObj[item.name.replace(/\s/g, '')] = out; }); - console.log(JSON.stringify(outObj)); + console.dir(outObj, {depth: null, colors: true}); } }); function next() { diff --git a/benchmarks/benchjs/update.js b/benchmarks/benchjs/update.js index 62bd971226b..3c32a9b20ef 100644 --- a/benchmarks/benchjs/update.js +++ b/benchmarks/benchjs/update.js @@ -115,7 +115,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { }); var nData = utils.clone(data); user.insert(nData, function(err, res) { - dIds.push(res[0]._id); + dIds.push(res.insertedIds[0]); --count || next(); }); BlogPost.create(blogData, function(err, bp) { @@ -132,7 +132,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { if (err) { throw err; } - bdIds.push(res[0]._id); + bdIds.push(res.insertedIds[0]); --count || next(); }); } @@ -329,7 +329,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function(err) { out.ops = item.hz; outObj[item.name.replace(/\s/g, '')] = out; }); - console.log(JSON.stringify(outObj)); + console.dir(outObj, {depth: null, colors: true}); } }); function next() {