redis / hiredis-node

Node wrapper for hiredis
BSD 3-Clause "New" or "Revised" License
305 stars 84 forks source link

Node 12 + upgrade hiredis #144

Open yosiat opened 5 years ago

yosiat commented 5 years ago

Hi!

We want to upgrade Node 12 LTS, and currently, hiredis-node doesn't support it. This PR:

Notes:

Benchmarks:

# master

PING: 55248.62 ops/sec
SET: 59347.18 ops/sec
GET: 70671.38 ops/sec
LPUSH 8 bytes: 66225.17 ops/sec
LPUSH 64 bytes: 61162.08 ops/sec
LPUSH 512 bytes: 55096.42 ops/sec
LRANGE 10 elements, 8 bytes: 54794.52 ops/sec
LRANGE 100 elements, 8 bytes: 30911.90 ops/sec
LRANGE 100 elements, 64 bytes: 28490.03 ops/sec
LRANGE 100 elements, 512 bytes: 14847.81 ops/sec

# hiredis + node 12

PING: 61162.08 ops/sec
SET: 64308.68 ops/sec
GET: 74626.87 ops/sec
LPUSH 8 bytes: 69444.44 ops/sec
LPUSH 64 bytes: 71684.59 ops/sec
LPUSH 512 bytes: 70671.38 ops/sec
LRANGE 10 elements, 8 bytes: 58997.05 ops/sec
LRANGE 100 elements, 8 bytes: 30721.97 ops/sec
LRANGE 100 elements, 64 bytes: 28288.54 ops/sec
LRANGE 100 elements, 512 bytes: 16233.77 ops/sec
yosiat commented 5 years ago

Update: we deployed this code to production and it's working fine for us for the past two days.