nohm
nohm copied to clipboard
Benchmark
- Install dev dependancies (fast-benchmark, async)
$ npm install - Then go to benchmark dir and run :
$ node bm.js
Notes / Rules
Conclusion based on my result :
- 10k objects created in ~2.5sec, so 4000 nohm objects/sec.
- 20k objects updated in 1.6sec, so 12500 nohm objects updated/sec.
- Factory is ~1.10x faster than manual way to load/create an object
- Updating is slower than Reading (make sense)
- Updating is ~1.5x faster than Creating (it looks like a huge difference, saving update require the same step as creating in nohm, no ? In my update-test, loading the object is not taken in account)
- Unlinking is ~1.6x slower than Linking (not sure why)
Rules
- Create 10k nohm objects (manual vs factory way)
- Read them all via load, then via factory (10k*2 => 20k)
- Update them all (setting string)
- Link them all to the same object (from another model created at this purpose)
- Unlink them all;
- Remove them all;
========================== CPU: 2 Nohm version: 0.9.8 Redis client version: 2.7.1 Redis server version: 3.1.999 OS: linux x64 node version: v5.4.1 current commit: 4265fdf
[+] Creating 10000 nohm objects modelCreateManual10000: 2527.708ms modelCreateFactory10000: 2293.851ms
[+] Reading 20000 uids modelReadLoad1: 1193.343ms modelReadFactory1: 1048.160ms
[+] Updating 20000 objects modelUpdate*1: 1626.119ms
[+] Linking 20000 objects to same object modelLink1: 3501.873ms zlink feature not detected, passing test modelZlink1: 0.142ms
[+] Unlinking 20000 links modelUnlink1: 5784.335ms zunlink feature not detected, passing test modelZunlink1: 0.154ms
[+] Deleting 20000 objects modelRemove*1: 1503.012ms