Skip to content

Conversation

@sam2x
Copy link
Collaborator

@sam2x sam2x commented May 27, 2017

  1. Install dev dependancies (fast-benchmark, async)
    $ npm install
  2. 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
modelCreateFactory
10000: 2293.851ms

[+] Reading 20000 uids
modelReadLoad1: 1193.343ms
modelReadFactory
1: 1048.160ms

[+] Updating 20000 objects
modelUpdate*1: 1626.119ms

[+] Linking 20000 objects to same object
modelLink1: 3501.873ms
zlink feature not detected, passing test
modelZlink
1: 0.142ms

[+] Unlinking 20000 links
modelUnlink1: 5784.335ms
zunlink feature not detected, passing test
modelZunlink
1: 0.154ms

[+] Deleting 20000 objects
modelRemove*1: 1503.012ms

This was referenced May 27, 2017
@maritz maritz added this to the 2.2 milestone Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants