Hi Ben, Information for what a lot of these calls do can generally be found by browsing the SDK source code.
The first call in your output indicates that your application has spent most of its time waiting for a response from an API call. Is this request getting high CPU warnings explicitly in the body of the logs? (Saying this request is using xx over the average amount of CPU). If not, it's likely that this is the high CPU warning is the result of datastore CPU, which is of less concern when optimizing your app (we've discussed the various ways CPU is accounted on this group several times before - we know it's an imperfect system at this point, but you still can get some useful information through these warnings, even though they may be occassionally misleading). If the CPU warning is related to the API CPU, the profiler will not really help for this case. The profiler is most useful when the application is seeing high runtime CPU, so you can determine where the runtime is spending most of its time executing. -Marzia On Tue, Nov 4, 2008 at 4:58 PM, Ben Nevile <[EMAIL PROTECTED]> wrote: > > Hi - I have a request that's sometimes taking more than 1000 mcycles, > and I'd like to use the profiler to figure out what's taking so long. > I implemented the profiling successfully, but the output doesn't help > me too much because I can't match a lot of the function names up with > parts of the API. For instance, what is > google3.apphosting.runtime._apphosting_runtime___python__apiproxy.Wait ? > > Anyone got any insight they can lend into the below profile? > > Thanks, > Ben > > > > Profile data: > 75037 function calls (70686 primitive calls) in 0.341 CPU > seconds > > Ordered by: internal time > List reduced from 699 to 80 due to restriction <80> > > ncalls tottime percall cumtime percall > filename:lineno(function) > 15 0.171 0.011 0.186 0.012 > {google3.apphosting.runtime._apphosting_runtime___python__apiproxy.Wait} > 252 0.022 0.000 0.022 0.000 {method '__reduce_ex__' > of 'object' objects} > 2575/3 0.015 0.000 0.086 0.029 /base/python_dist/lib/ > python2.5/pickle.py:263(save) > 439/58 0.007 0.000 0.015 0.000 > {google3.net.proto._net_proto___parse__python.MergeFromString} > 1305 0.006 0.000 0.012 0.000 /base/python_dist/lib/ > python2.5/pickle.py:221(memoize) > 247/42 0.005 0.000 0.077 0.002 /base/python_dist/lib/ > python2.5/pickle.py:649(_batch_setitems) > 252/47 0.003 0.000 0.080 0.002 /base/python_dist/lib/ > python2.5/pickle.py:339(save_reduce) > 5127 0.003 0.000 0.003 0.000 {method 'get' of 'dict' > objects} > 11 0.003 0.000 0.022 0.002 /base/python_dist/lib/ > python2.5/pickle.py:839(load) > 4551 0.003 0.000 0.003 0.000 {len} > 22 0.003 0.000 0.003 0.000 /base/python_lib/ > versions/1/google/appengine/datastore/entity_pb.py:3477(__init__) > 182/91 0.002 0.000 0.003 0.000 > {google3.net.proto._net_proto___parse__python.Encode} > 5357 0.002 0.000 0.002 0.000 {id} > 4910 0.002 0.000 0.002 0.000 {method 'read' of > 'cStringIO.StringO' objects} > 29 0.002 0.000 0.002 0.000 {__import__} > 21 0.002 0.000 0.004 0.000 /base/python_lib/ > versions/1/django/utils/html.py:53(urlize) > 4563 0.002 0.000 0.002 0.000 {method 'write' of > 'cStringIO.StringO' objects} > 1305 0.002 0.000 0.003 0.000 /base/python_dist/lib/ > python2.5/pickle.py:244(put) > 246 0.002 0.000 0.003 0.000 /base/python_dist/lib/ > python2.5/pickle.py:1253(encode_long) > 15 0.002 0.000 0.002 0.000 > > {google3.apphosting.runtime._apphosting_runtime___python__apiproxy.MakeCall} > 22 0.002 0.000 0.012 0.001 /base/python_lib/ > versions/1/google/appengine/api/datastore.py:502(_FromPb) > 1155 0.002 0.000 0.002 0.000 /base/python_dist/lib/ > python2.5/struct.py:54(pack) > 978/861 0.002 0.000 0.002 0.000 {getattr} > 287 0.001 0.000 0.006 0.000 /base/python_dist/lib/ > python2.5/pickle.py:486(save_unicode) > 21 0.001 0.000 0.005 0.000 /base/python_lib/ > versions/1/django/template/defaultfilters.py:198(urlizetrunc) > 252 0.001 0.000 0.004 0.000 /base/python_lib/ > versions/1/google/appengine/api/datastore_types.py: > 1012(ValidateProperty) > 602 0.001 0.000 0.001 0.000 {method 'encode' of > 'unicode' objects} > 375 0.001 0.000 0.005 0.000 /base/python_dist/lib/ > python2.5/pickle.py:474(save_string) > 206/42 0.001 0.000 0.078 0.002 /base/python_dist/lib/ > python2.5/pickle.py:634(save_dict) > 1798 0.001 0.000 0.001 0.000 {chr} > 21 0.001 0.000 0.002 0.000 /base/python_lib/ > versions/1/django/template/defaultfilters.py:438(timesince) > 439/58 0.001 0.000 0.016 0.000 /base/python_lib/ > versions/1/google/net/proto/ProtocolBuffer.py:61(MergeFromString) > 148 0.001 0.000 0.003 0.000 /base/python_lib/ > versions/1/django/template/__init__.py:617(resolve_variable) > 3375 0.001 0.000 0.001 0.000 {method 'append' of > 'list' objects} > 655 0.001 0.000 0.001 0.000 {built-in method match} > 14 0.001 0.000 0.001 0.000 {method 'clear' of > 'dict' objects} > 505 0.001 0.000 0.003 0.000 /base/python_dist/lib/ > python2.5/pickle.py:1166(load_long_binput) > 1948 0.001 0.000 0.001 0.000 {isinstance} > 737 0.001 0.000 0.002 0.000 /base/python_dist/lib/ > python2.5/pickle.py:254(get) > 82 0.001 0.000 0.008 0.000 /base/python_dist/lib/ > python2.5/pickle.py:684(save_inst) > 1154 0.001 0.000 0.001 0.000 {repr} > 252 0.001 0.000 0.004 0.000 /base/python_dist/lib/ > python2.5/pickle.py:526(save_tuple) > 301 0.001 0.000 0.002 0.000 /base/python_lib/ > versions/1/google/appengine/api/datastore_types.py:77(ValidateString) > 246 0.001 0.000 0.004 0.000 /base/python_dist/lib/ > python2.5/pickle.py:455(save_long) > 124 0.001 0.000 0.003 0.000 /base/python_lib/ > versions/1/google/appengine/api/datastore_types.py: > 1299(FromPropertyPb) > 2575 0.001 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/pickle.py:327(persistent_id) > 732 0.001 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/struct.py:77(unpack) > 333 0.001 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/pickle.py:1161(load_binput) > 173 0.001 0.000 0.001 0.000 /base/python_lib/ > versions/1/google/appengine/datastore/entity_pb.py:2512(add_element) > 321 0.001 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/pickle.py:982(load_short_binstring) > 980 0.001 0.000 0.001 0.000 {method 'startswith' of > 'unicode' objects} > 147 0.001 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/pickle.py:977(load_binunicode) > 21 0.001 0.000 0.001 0.000 /base/python_lib/ > versions/1/django/utils/timesince.py:5(timesince) > 335 0.001 0.000 0.001 0.000 {hasattr} > 147 0.001 0.000 0.003 0.000 /base/python_dist/lib/ > python2.5/pickle.py:1204(load_build) > 106 0.001 0.000 0.001 0.000 /base/python_lib/ > versions/1/google/appengine/api/datastore_types.py:275(id) > 1 0.001 0.001 0.014 0.014 /base/python_lib/ > versions/1/django/template/defaulttags.py:85(render) > 127 0.001 0.000 0.011 0.000 /base/python_lib/ > versions/1/django/template/__init__.py:561(resolve) > 44 0.001 0.000 0.003 0.000 /base/python_dist/lib/ > python2.5/pickle.py:1194(load_setitems) > 22 0.001 0.000 0.001 0.000 /base/python_lib/ > versions/1/google/appengine/ext/db/__init__.py: > 889(_load_entity_values) > 231 0.001 0.000 0.001 0.000 {_codecs.utf_8_decode} > 374 0.000 0.000 0.001 0.000 /base/python_lib/ > versions/1/google/appengine/datastore/entity_pb.py:1727(IsInitialized) > 255 0.000 0.000 0.000 0.000 {issubclass} > 231 0.000 0.000 0.001 0.000 {method 'decode' of > 'str' objects} > 114/69 0.000 0.000 0.003 0.000 /base/python_lib/ > versions/1/google/net/proto/ProtocolBuffer.py:171(CopyFrom) > 498 0.000 0.000 0.001 0.000 /base/python_lib/ > versions/1/google/appengine/datastore/entity_pb.py:762(IsInitialized) > 19 0.000 0.000 0.001 0.000 /base/python_lib/ > versions/1/google/appengine/api/datastore_types.py:439(__cmp__) > 182/91 0.000 0.000 0.003 0.000 /base/python_lib/ > versions/1/google/net/proto/ProtocolBuffer.py:45(Encode) > 198 0.000 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/pickle.py:1147(load_binget) > 15 0.000 0.000 0.004 0.000 /base/python_lib/ > versions/1/google/appengine/runtime/apiproxy.py:114(MakeCall) > 126 0.000 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/pickle.py:1319(decode_long) > 151 0.000 0.000 0.002 0.000 /base/python_lib/ > versions/1/google/appengine/datastore/entity_pb.py:2797(__init__) > 242 0.000 0.000 0.001 0.000 /base/python_lib/ > versions/1/google/appengine/datastore/entity_pb.py:2555(IsInitialized) > 126 0.000 0.000 0.003 0.000 /base/python_lib/ > versions/1/google/appengine/api/datastore.py:342(__setitem__) > 1 0.000 0.000 0.000 0.000 {open} > 23/1 0.000 0.000 0.014 0.014 /base/python_lib/ > versions/1/django/template/__init__.py:701(render) > 126 0.000 0.000 0.001 0.000 /base/python_dist/lib/ > python2.5/pickle.py:935(load_long1) > 1 0.000 0.000 0.000 0.000 {method 'read' of > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---