Test query performance using Java and Python SDKs for Appengine
License
greensnark/appenginedatastoretest
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Appengine Datastore Query Test ------------------------------ (See COPYING for license terms. This code is MIT-licensed.) This repository contains a barebones appengine Python app (py-load) to seed the datastore with 2000 records and then run a few queries of 1000 records to measure query performance. The repository also includes a minimal appengine Java app (java-load) to query 1000 records (previously inserted by the Python app) and measure query performance. Query performance measures just a few (5) samples, so this is not statistically rigorous. It does serve to get a rough picture of relative performance. I focus primarily on query performance here because that's the number of interest to me. It's relatively easy to work around slow inserts and deletes; less easy to work around slow queries. Python app ---------- To try the Python app, edit app.yaml to point to an appengine app you own and use `appcfg.py update py-load` to upload it. Java app -------- To try the Java app, edit build.xml and point it at your appengine Java SDK, edit WEB-INF/appengine-web.xml and point the application at the app you want to deploy to, then run `ant && appcfg.sh update war` Testing the app --------------- Assuming you've used an appname of 'dsqueryspeed' (insert your app name here), you can access the two versions at: Python: http://2.latest.dsqueryspeed.appspot.com/ Java: http://1.latest.dsqueryspeed.appspot.com/ Note that both apps share the same datastore, so the query test is querying exactly the same query on exactly the same datastore. Inserting Records ----------------- The Python app's landing page has a button to insert 2k records of an entity that looks like this (*no* fields indexed): Person ====== firstname (length 8) lastname (length 8) address (20) city (10) state (2) zip (5) I recognize this is a toy model; the intent is merely to compare the relative performance of Java and Python for medium-large datastore queries. To avoid DeadlineExceededErrors, the Python app uses a deferred task to insert records in batches until it's done inserting 2k records. You may refresh /insert_status to check if the app is still busy or has finished inserting records.
About
Test query performance using Java and Python SDKs for Appengine
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published