Giter Club home page Giter Club logo

android-orm-benchmark's Introduction

#android-orm-benchmark

##Summary

ORM-Benchmark is an Android application built in Eclipse that benchmarks the following against each other:

The benchmark runs the following tasks:

  • CREATE_DB - Creation of database structure
  • WRITE_DATA - Writing 1000 'user' objects and 10000 'message' objects
  • READ_DATA - Read all 10000 'message' objects in the table
  • READ_INDEXED - Read an indexed field (the 5000th 'message' in the table)
  • READ_SEARCH - Query the first 100 rows that matches a search term (using LIKE)
  • DROP_DB - Drop database strucuture

Each task is run 5 times, and the application reports the average time for each in milliseconds.

##Sample Output

Building and running the ORM-Benchmark project produces output similar to that below.

  • The times are in milliseconds.
  • The results are shown on the device and are also logged to Logcat.

The results below combine the in-memory database results with the on disk database results side by side. They are from a Nexus 4 on 20th Dec 2013, and we've put an "M" in front of the tests for the in-memory results.

Task CREATE_DB
M RAW - Avg: 4
RAW - Avg: 230

M ORMLite - Avg: 6
ORMLite - Avg: 233

M GreenDAO - Avg: 3
GreenDAO - Avg: 163

Task WRITE_DATA
M RAW - Avg: 2925
RAW - Avg: 3281

M ORMLite - Avg: 6898
ORMLite - Avg: 7203

M GreenDAO - Avg: 1960
GreenDAO - Avg: 2470

Task READ_DATA
M RAW - Avg: 803
RAW - Avg: 808

M ORMLite - Avg: 1656
ORMLite - Avg: 1729

M GreenDAO - Avg: 1183
GreenDAO - Avg: 1186

Task READ_INDEXED
M RAW - Avg: 1
RAW - Avg: 1

M ORMLite - Avg: 2
ORMLite - Avg: 3

M GreenDAO - Avg: 1
GreenDAO - Avg: 1

Task READ_SEARCH
M RAW - Avg: 8
RAW - Avg: 8

M ORMLite - Avg: 119
ORMLite - Avg: 156

M GreenDAO - Avg: 7
GreenDAO - Avg: 6

Task DROP_DB
M RAW - Avg: 8
RAW - Avg: 515

M ORMLite - Avg: 10
ORMLite - Avg: 558

M GreenDAO - Avg: 8
GreenDAO - Avg: 369

##Screenshots

main

After pressing "Run Benchmark" you can press "Show Results" to see the results:

results

##Technical Reference ###Customizing Benchmark Tests

###Changing The GreenDao Tests

GreenDao requires a separate project to generate the source code for database entities and DAOs. The ORM-Benchmark-GreenDAO-Generator project is a Java application that you can run to regenerate the database definitions. You only need to do this if you want to change the GreenDao database model!

android-orm-benchmark's People

Contributors

daj avatar jogahcr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.