A sandbox playgroud with Jedis. Testing different aproach about how to write/read data to Redis.
mvn clean compile assembly:single
java -jar ./target/redis-playground-1.0-SNAPSHOT-jar-with-dependencies.jar
test machine : ubuntu 16.04, Intel Core i7-4510U, 6Gb
Redis: v. 3.2.8, default configuraion from sources
Run 1: avg 236ms.
Run 2: avg 232ms.
Run 3: avg 233ms.
Run 1: avg 59ms.
Run 2: avg 51ms.
Run 3: avg 51ms.
Run 1: avg 56ms.
Run 2: avg 48ms.
Run 3: avg 49ms.
Run 1: avg 64ms.
Run 2: avg 52ms.
Run 3: avg 56ms.
note: a resource monitor shows more extensive CPU usage. It is easy explain that we do 10x more requests vs cases where we save a recond as a single json string
Run 1: avg 57ms.
Run 2: avg 51ms.
Run 3: avg 51ms.
Run 1: avg 226ms.
Run 2: avg 229ms.
Run 3: avg 228ms.
Run 1: avg 50ms.
Run 2: avg 50ms.
Run 3: avg 47ms.
Run 1: avg 1546ms.
Run 2: avg 1550ms.
Run 3: avg 1533ms.
Run 1: avg 59ms.
Run 2: avg 55ms.
Run 3: avg 57ms.