Hi Matija,

Code:

from time import time
from google.appengine.ext import db

class Test(db.Model):
pass

keys = [db.Key.from_path('Test', i) for i in xrange(1, 21)]
tests = [Test(key=key) for key in keys]
db.put(tests)

t = time()
Test.all().fetch(20)
print 'fetch 20:', time() - t

t = time()
db.get(keys)
print 'get 20:', time() - t

t = time()
config = db.create_config(deadline=5, read_policy=db.EVENTUAL_CONSISTENCY)
db.get(keys, config=config)
print 'get 20 (EVENTUAL_CONSISTENCY):', time() - t

key = db.Key.from_path('Test', 21)
test = Test(key=key)

t = time()
test.put()
print 'put 1:', time() - t

db.delete(keys + [key])


Result:

Master/Slave:

> fetch 20: 0.0107522010803

get 20: 0.0108997821808

get 20 (EVENTUAL_CONSISTENCY): 0.0107271671295

put 1: 0.0120298862457


> ms=193 cpu_ms=2085 api_cpu_ms=2015 cpm_usd=0.058186



High Replication:

> fetch 20: 0.0176739692688

get 20: 0.101014137268

get 20 (EVENTUAL_CONSISTENCY): 0.0169019699097

put 1: 0.0453717708588


> ms=690 cpu_ms=5078 api_cpu_ms=4987 cpm_usd=0.141334



I think you can ignore the differences because the dataset is too small, but
the time would be longer if you have many properties.
----------
keakon

My blog(Chinese): www.keakon.net
Blog source code: https://bitbucket.org/keakon/doodle/



On Fri, Jan 7, 2011 at 6:14 PM, Matija <[email protected]> wrote:

> Hi Keakon,
>
> could you put benchmark results for master/slave and high replication
> datastore with 20 entities (for get and fetch) and 1 entity for put and
> delete instead of 500. We present data in 20 entity size batch and save only
> one entity (or entity group) per request so to us this would be more
> realistic benchmark. Please use original code without single entity group.
>
> Tnx, MATijA.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to