Comparing version 0.7.3 to 0.7.4
@@ -217,3 +217,6 @@ /** | ||
if (i === n) { // Finished | ||
console.log("===== RESULT (remove) ===== " + Math.floor(1000* n / profiler.elapsedSinceLastStep()) + " ops/s"); | ||
console.log("===== RESULT (1 remove + 1 insert) ===== " + Math.floor(1000* n / profiler.elapsedSinceLastStep()) + " ops/s"); | ||
console.log("====== IMPORTANT: Please note that this is the time that was needed to perform " + n + " removes and " + n + " inserts"); | ||
console.log("====== The extra inserts are needed to keep collection size at " + n + " items for the benchmark to make sense"); | ||
console.log("====== Use the insert speed logged above to calculate the actual remove speed, which is higher (should be significantly so if you use indexing)"); | ||
profiler.step('Finished removing ' + n + ' docs'); | ||
@@ -220,0 +223,0 @@ return cb(); |
@@ -47,3 +47,3 @@ /** | ||
if (typeof obj === 'object') { | ||
if (typeof obj === 'object' && obj !== null) { | ||
Object.keys(obj).forEach(function (k) { | ||
@@ -50,0 +50,0 @@ checkKey(k, obj[k]); |
{ | ||
"name": "nedb", | ||
"version": "0.7.3", | ||
"version": "0.7.4", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "tldr.io", |
@@ -9,3 +9,5 @@ # NeDB (Node embedded database) | ||
**NeDB is not intended to be a replacement of large-scale databases such as MongoDB!** Its goal is to provide you with a clean and easy way to query data and persist it to disk, for web applications that do not need lots of concurrent connections, for example a <a href="https://github.com/louischatriot/braindead-ci" target="_blank">continuous integration and deployment server</a> and desktop applications built with <a href="https://github.com/rogerwang/node-webkit" target="_blank">Node Webkit</a>. | ||
## Installation, tests | ||
@@ -330,10 +332,7 @@ Module name on npm is `nedb`. | ||
### Speed | ||
**NeDB is not intended to be a replacement of large-scale databases such as MongoDB!** Its goal is to provide you with a clean and easy way to query data and persist it to disk, for web applications that do not need lots of concurrent connections, for example a <a href="https://github.com/louischatriot/braindead-ci" target="_blank">continuous integration and deployment server</a> and desktop applications built with <a href="https://github.com/rogerwang/node-webkit" target="_blank">Node Webkit</a>. | ||
As such, it was not designed for speed. That said, it is still pretty fast on the expected datasets, especially if you use indexing. On my machine (3 years old, no SSD), with a collection | ||
containing 10,000 documents, with indexing and no pipelining: | ||
NeDB is not intended to be a replacement of large-scale databases such as MongoDB, and as such was not designed for speed. That said, it is still pretty fast on the expected datasets, especially if you use indexing. On my machine (3 years old, no SSD), with a collection containing 10,000 documents, with indexing and no pipelining: | ||
* Insert: **5,950 ops/s** | ||
* Find: **41,320 ops/s** | ||
* Update: **4,490 ops/s** | ||
* Remove: **3,220 ops/s** | ||
* Remove: **6,620 ops/s** | ||
@@ -340,0 +339,0 @@ You can run the simple benchmarks I use by executing the scripts in the `benchmarks` folder. Run them with the `--help` flag to see how they work. |
@@ -162,2 +162,8 @@ var model = require('../lib/model') | ||
it('Properties with a null value dont trigger an error', function () { | ||
var obj = { prop: null }; | ||
model.checkObject(obj); | ||
}); | ||
}); // ==== End of 'Object checking' ==== // | ||
@@ -164,0 +170,0 @@ |
210516
4516
377