eeVoskos/AndroidPersistenceTests — pull request #1 by cmelchior (2014-11-10 12:34:09+00:00)
Title: Read tests and measurements

Hi @eeVoskos

Christian from Realm here.
Nice project! We have done a fair bit of benchmarking ourselves, and it's actually very hard to do reliably, consistent and fair to all.
Specially with Java and it's JIT and garbage collection. Anyway we highly welcome an independent test against all database solutions as we have seen quite a bit of differences in both speed an the more subjective "ease of use"!

I took the liberty to refactor your test suite a little:

1. DB initialisation for both SQLite and Realm has been moved outside the test loop so it is only write/read speed being measured. It doesn't make much of a difference here though, but just to separate things. Maybe another test should be added to measure open/close that alone, but that's usually something that's done initially and therefore not so relevant in real apps?

2. Read tests has been modified to iterate the result set, so String data is fetched from the Database. I guess this get's closer to a real life scenario, as querying without using the results is less useful.

I hope this is useful?