Advertisement
Guest User

profile_solution1

a guest
Sep 24th, 2012
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.06 KB | None | 0 0
  1. # Solution 2 profile
  2.  
  3. 2533705 function calls (2354516 primitive calls) in 3.630 seconds
  4.  
  5. Ordered by: standard name
  6.  
  7. ncalls tottime percall cumtime percall filename:lineno(function)
  8. 1 0.000 0.000 3.630 3.630 <string>:1(<module>)
  9. 39456 0.025 0.000 0.062 0.000 <string>:8(__new__)
  10. 4 0.000 0.000 0.000 0.000 __init__.py:102(_param_escape)
  11. 2192 0.002 0.000 0.008 0.000 __init__.py:1118(debug)
  12. 1 0.000 0.000 0.003 0.003 __init__.py:119(connect)
  13. 2192 0.003 0.000 0.004 0.000 __init__.py:123(validate_thread_sharing)
  14. 2192 0.004 0.000 0.004 0.000 __init__.py:1318(getEffectiveLevel)
  15. 2192 0.003 0.000 0.006 0.000 __init__.py:1332(isEnabledFor)
  16. 6576 0.014 0.000 0.022 0.000 __init__.py:172(is_managed)
  17. 1 0.000 0.000 0.001 0.001 __init__.py:185(dumps)
  18. 2192 0.008 0.000 0.018 0.000 __init__.py:204(db_type)
  19. 2192 0.001 0.000 0.001 0.000 __init__.py:276(get_db_prep_value)
  20. 2192 0.005 0.000 0.010 0.000 __init__.py:294(get_prep_lookup)
  21. 2192 0.011 0.000 0.044 0.000 __init__.py:302(cursor)
  22. 2192 0.003 0.000 0.004 0.000 __init__.py:311(make_debug_cursor)
  23. 2192 0.007 0.000 0.013 0.000 __init__.py:322(get_db_prep_lookup)
  24. 4926 0.003 0.000 0.005 0.000 __init__.py:489(value_from_object)
  25. 1 0.000 0.000 0.000 0.000 __init__.py:49(normalize_encoding)
  26. 2086 0.000 0.000 0.000 0.000 __init__.py:519(get_internal_type)
  27. 2192 0.002 0.000 0.002 0.000 __init__.py:534(get_prep_value)
  28. 2192 0.002 0.000 0.003 0.000 __init__.py:659(compiler)
  29. 1 0.000 0.000 0.000 0.000 __init__.py:71(search_function)
  30. 106 0.002 0.000 0.003 0.000 __init__.py:76(__init__)
  31. 106 0.000 0.000 0.000 0.000 __init__.py:974(get_internal_type)
  32. 1 0.000 0.000 0.000 0.000 base.py:151(_get_pg_version)
  33. 2192 0.010 0.000 0.021 0.000 base.py:157(_cursor)
  34. 2463 0.002 0.000 0.002 0.000 base.py:267(__init__)
  35. 2463 0.053 0.000 0.115 0.000 base.py:278(__init__)
  36. 4926 0.002 0.000 0.002 0.000 base.py:36(utc_tzinfo_factory)
  37. 378 0.000 0.000 0.001 0.000 base.py:425(_get_pk_val)
  38. 2192 0.001 0.000 0.001 0.000 base.py:47(__init__)
  39. 2192 0.003 0.000 0.736 0.000 base.py:50(execute)
  40. 6576 0.007 0.000 0.010 0.000 base.py:66(__getattr__)
  41. 1 0.000 0.000 0.000 0.000 codecs.py:77(__new__)
  42. 1 0.000 0.000 0.000 0.000 compiler.py:1(<module>)
  43. 1 0.000 0.000 0.000 0.000 compiler.py:1041(SQLAggregateCompiler)
  44. 1 0.000 0.000 0.000 0.000 compiler.py:1060(SQLDateCompiler)
  45. 1 0.000 0.000 0.000 0.000 compiler.py:14(SQLCompiler)
  46. 2192 0.002 0.000 0.002 0.000 compiler.py:15(__init__)
  47. 2192 0.024 0.000 0.234 0.000 compiler.py:168(get_columns)
  48. 2192 0.004 0.000 0.015 0.000 compiler.py:21(pre_sql_setup)
  49. 2192 0.103 0.000 0.194 0.000 compiler.py:248(get_default_columns)
  50. 2192 0.002 0.000 0.002 0.000 compiler.py:313(get_distinct)
  51. 2192 0.008 0.000 0.017 0.000 compiler.py:333(get_ordering)
  52. 46244 0.028 0.000 0.039 0.000 compiler.py:37(quote_name_unless_alias)
  53. 212 0.001 0.000 0.007 0.000 compiler.py:418(find_ordering_name)
  54. 212 0.001 0.000 0.006 0.000 compiler.py:448(_setup_joins)
  55. 212 0.000 0.000 0.000 0.000 compiler.py:476(_final_join_removal)
  56. 2192 0.010 0.000 0.011 0.000 compiler.py:495(get_from_clause)
  57. 2192 0.041 0.000 0.528 0.000 compiler.py:53(as_sql)
  58. 2192 0.002 0.000 0.002 0.000 compiler.py:539(get_grouping)
  59. 2192 0.003 0.000 0.004 0.000 compiler.py:741(deferred_to_columns)
  60. 4655 0.020 0.000 1.509 0.000 compiler.py:751(results_iter)
  61. 2192 0.017 0.000 1.395 0.001 compiler.py:794(execute_sql)
  62. 4384 0.012 0.000 0.089 0.000 compiler.py:832(<lambda>)
  63. 1 0.000 0.000 0.000 0.000 compiler.py:842(SQLInsertCompiler)
  64. 1 0.000 0.000 0.000 0.000 compiler.py:919(SQLDeleteCompiler)
  65. 1 0.000 0.000 0.000 0.000 compiler.py:933(SQLUpdateCompiler)
  66. 117274/25880 0.338 0.000 1.030 0.000 copy.py:145(deepcopy)
  67. 29416 0.005 0.000 0.005 0.000 copy.py:198(_deepcopy_atomic)
  68. 36522/32350 0.035 0.000 0.320 0.000 copy.py:226(_deepcopy_list)
  69. 17112/8556 0.100 0.000 0.533 0.000 copy.py:234(_deepcopy_tuple)
  70. 2086 0.012 0.000 0.069 0.000 copy.py:253(_deepcopy_dict)
  71. 115188 0.142 0.000 0.178 0.000 copy.py:267(_keep_alive)
  72. 8556 0.042 0.000 0.306 0.000 copy.py:306(_reconstruct)
  73. 2086 0.001 0.000 0.002 0.000 copy_reg.py:92(__newobj__)
  74. 31186 0.052 0.000 0.067 0.000 datastructures.py:103(__new__)
  75. 31186 0.096 0.000 0.126 0.000 datastructures.py:108(__init__)
  76. 6470 0.018 0.000 0.069 0.000 datastructures.py:127(__deepcopy__)
  77. 5126 0.011 0.000 0.011 0.000 datastructures.py:131(__setitem__)
  78. 8771 0.010 0.000 0.032 0.000 datastructures.py:157(items)
  79. 8662 0.004 0.000 0.004 0.000 datastructures.py:160(iteritems)
  80. 33209 0.014 0.000 0.014 0.000 datastructures.py:164(keys)
  81. 8771 0.007 0.000 0.016 0.000 datastructures.py:170(values)
  82. 2192 0.001 0.000 0.001 0.000 datastructures.py:173(itervalues)
  83. 17324 0.035 0.000 0.145 0.000 datastructures.py:200(copy)
  84. 2192 0.009 0.000 0.009 0.000 datastructures.py:489(__init__)
  85. 4927 0.008 0.000 0.041 0.000 dispatcher.py:149(send)
  86. 4926 0.010 0.000 0.019 0.000 dispatcher.py:214(_live_receivers)
  87. 9852 0.008 0.000 0.023 0.000 dispatcher.py:8(_make_id)
  88. 1 0.000 0.000 0.001 0.001 encoder.py:180(encode)
  89. 1 0.001 0.001 0.001 0.001 encoder.py:206(iterencode)
  90. 11067 0.009 0.000 0.013 0.000 functional.py:182(inner)
  91. 1 0.000 0.000 0.001 0.001 importlib.py:18(import_module)
  92. 1 0.000 0.000 0.000 0.000 loading.py:115(app_cache_ready)
  93. 272 0.001 0.000 0.009 0.000 manager.py:103(get_empty_query_set)
  94. 107 0.000 0.000 0.004 0.000 manager.py:106(get_query_set)
  95. 272 0.000 0.000 0.010 0.000 manager.py:112(none)
  96. 1 0.000 0.000 0.008 0.008 manager.py:130(get)
  97. 2086 0.002 0.000 0.002 0.000 manager.py:217(__get__)
  98. 106 0.001 0.000 0.058 0.001 managers.py:101(_mptt_filter)
  99. 107 0.001 0.000 0.024 0.000 managers.py:175(get_query_set)
  100. 106 0.000 0.000 0.000 0.000 managers.py:71(parent_attr)
  101. 107 0.000 0.000 0.000 0.000 managers.py:75(left_attr)
  102. 107 0.000 0.000 0.000 0.000 managers.py:83(tree_id_attr)
  103. 106 0.001 0.000 0.001 0.000 managers.py:91(_translate_lookups)
  104. 1 0.000 0.000 0.000 0.000 models.py:218(__getattr__)
  105. 2463 0.009 0.000 0.172 0.000 models.py:328(__init__)
  106. 1134 0.001 0.000 0.002 0.000 models.py:332(_mpttfield)
  107. 378 0.001 0.000 0.073 0.000 models.py:377(get_children)
  108. 378 0.001 0.000 0.003 0.000 models.py:428(get_descendant_count)
  109. 378 0.000 0.000 0.003 0.000 models.py:545(is_leaf_node)
  110. 2463/378 0.023 0.000 3.419 0.009 models.py:55(__init__)
  111. 4926 0.010 0.000 0.038 0.000 models.py:63(get_raw_field_value)
  112. 4172/756 0.007 0.000 0.009 0.000 models.py:75(get_wbs_code)
  113. 2463 0.011 0.000 0.049 0.000 models.py:82(update_mptt_cached_fields)
  114. 2192 0.001 0.000 0.001 0.000 operations.py:171(max_name_length)
  115. 2192 0.008 0.000 0.012 0.000 operations.py:191(last_executed_query)
  116. 2192 0.002 0.000 0.002 0.000 operations.py:40(lookup_cast)
  117. 2192 0.001 0.000 0.001 0.000 operations.py:54(field_cast_sql)
  118. 44052 0.034 0.000 0.051 0.000 operations.py:69(quote_name)
  119. 1 0.000 0.000 0.000 0.000 operations.py:74(set_time_zone_sql)
  120. 18619 0.010 0.000 0.010 0.000 options.py:216(_fields)
  121. 4385 0.002 0.000 0.002 0.000 options.py:231(get_fields_with_model)
  122. 9309 0.009 0.000 0.012 0.000 options.py:255(_many_to_many)
  123. 1 0.000 0.000 0.000 0.000 options.py:263(get_m2m_with_model)
  124. 9309 0.028 0.000 0.045 0.000 options.py:285(get_field)
  125. 4596 0.003 0.000 0.003 0.000 options.py:295(get_field_by_name)
  126. 1 0.000 0.000 0.000 0.000 options.py:334(init_name_map)
  127. 1 0.000 0.000 0.000 0.000 options.py:368(get_all_related_objects_with_model)
  128. 3 0.000 0.000 0.000 0.000 options.py:383(<lambda>)
  129. 3 0.000 0.000 0.000 0.000 options.py:386(<lambda>)
  130. 1 0.000 0.000 0.000 0.000 options.py:421(get_all_related_m2m_objects_with_model)
  131. 2464 0.038 0.000 0.080 0.000 query.py:101(__init__)
  132. 2192 0.043 0.000 0.194 0.000 query.py:1030(add_filter)
  133. 483 0.001 0.000 3.529 0.007 query.py:108(_result_iter)
  134. 272 0.001 0.000 0.009 0.000 query.py:1121(__init__)
  135. 2192 0.018 0.000 0.239 0.000 query.py:1219(add_q)
  136. 2404 0.040 0.000 0.050 0.000 query.py:1270(setup_joins)
  137. 2192 0.004 0.000 0.007 0.000 query.py:1481(trim_joins)
  138. 6471 0.003 0.000 0.003 0.000 query.py:1614(can_filter)
  139. 2193 0.002 0.000 0.003 0.000 query.py:1672(add_ordering)
  140. 2193 0.001 0.000 0.001 0.000 query.py:1692(clear_ordering)
  141. 2192 0.003 0.000 0.004 0.000 query.py:1847(get_loaded_field_names)
  142. 8980 0.004 0.000 0.004 0.000 query.py:1886(_aggregate_select)
  143. 13364 0.006 0.000 0.006 0.000 query.py:1904(_extra_select)
  144. 636 0.000 0.000 0.000 0.000 query.py:1955(get_order_dir)
  145. 2192 0.010 0.000 0.027 0.000 query.py:215(get_compiler)
  146. 2192 0.001 0.000 0.001 0.000 query.py:227(get_meta)
  147. 4655/485 0.037 0.000 3.533 0.007 query.py:231(iterator)
  148. 6470 0.135 0.000 1.288 0.000 query.py:235(clone)
  149. 8934 0.020 0.000 0.099 0.000 query.py:32(__init__)
  150. 2086/378 0.017 0.000 3.308 0.009 query.py:353(get)
  151. 4384 0.002 0.000 0.002 0.000 query.py:559(deferred_to_data)
  152. 2192 0.003 0.000 0.603 0.000 query.py:616(filter)
  153. 2192 0.010 0.000 0.600 0.000 query.py:630(_filter_or_exclude)
  154. 2298 0.008 0.000 0.015 0.000 query.py:649(table_alias)
  155. 424 0.001 0.000 0.001 0.000 query.py:675(ref_alias)
  156. 2404 0.005 0.000 0.009 0.000 query.py:679(unref_alias)
  157. 212 0.000 0.000 0.000 0.000 query.py:683(promote_alias)
  158. 212 0.000 0.000 0.000 0.000 query.py:700(promote_alias_chain)
  159. 2192 0.009 0.000 0.048 0.000 query.py:710(reset_refcounts)
  160. 2193 0.007 0.000 0.653 0.000 query.py:748(order_by)
  161. 2086/378 0.016 0.000 3.090 0.008 query.py:77(__len__)
  162. 2085 0.002 0.000 0.356 0.000 query.py:817(using)
  163. 2404 0.004 0.000 0.028 0.000 query.py:831(get_initial_alias)
  164. 4384 0.002 0.000 0.003 0.000 query.py:842(db)
  165. 2298 0.009 0.000 0.025 0.000 query.py:851(join)
  166. 6470 0.030 0.000 1.333 0.000 query.py:853(_clone)
  167. 106 0.002 0.000 3.528 0.033 query.py:867(_fill_cache)
  168. 378 0.000 0.000 0.001 0.000 query.py:92(__iter__)
  169. 2192 0.010 0.000 0.011 0.000 query.py:929(setup_inherited_models)
  170. 2192 0.008 0.000 0.012 0.000 query_utils.py:43(__init__)
  171. 4 0.000 0.000 0.000 0.000 re.py:248(_compile_repl)
  172. 4 0.000 0.000 0.000 0.000 re.py:268(_subx)
  173. 106 0.001 0.000 0.004 0.000 related.py:1011(db_type)
  174. 106 0.000 0.000 0.003 0.000 related.py:127(get_prep_lookup)
  175. 106 0.000 0.000 0.003 0.000 related.py:144(get_db_prep_lookup)
  176. 212 0.002 0.000 0.005 0.000 related.py:175(_pk_trace)
  177. 3 0.000 0.000 0.000 0.000 related.py:215(related_query_name)
  178. 2085 0.020 0.000 0.459 0.000 related.py:308(get_query_set)
  179. 5879/3794 0.037 0.000 3.392 0.001 related.py:331(__get__)
  180. 3 0.000 0.000 0.000 0.000 related.py:852(is_hidden)
  181. 2192 0.004 0.000 0.005 0.000 related.py:856(get_related_field)
  182. 1 0.000 0.000 0.000 0.000 sre_parse.py:178(__init__)
  183. 4 0.000 0.000 0.000 0.000 sre_parse.py:182(__next)
  184. 3 0.000 0.000 0.000 0.000 sre_parse.py:201(get)
  185. 1 0.000 0.000 0.000 0.000 sre_parse.py:691(parse_template)
  186. 1 0.000 0.000 0.000 0.000 sre_parse.py:698(literal)
  187. 2192 0.007 0.000 0.010 0.000 tree.py:120(start_subtree)
  188. 2192 0.007 0.000 0.011 0.000 tree.py:140(end_subtree)
  189. 26530 0.030 0.000 0.030 0.000 tree.py:18(__init__)
  190. 15026/12940 0.053 0.000 0.502 0.000 tree.py:55(__deepcopy__)
  191. 2192 0.002 0.000 0.002 0.000 tree.py:71(__nonzero__)
  192. 2192 0.005 0.000 0.006 0.000 tree.py:83(add)
  193. 2463 0.003 0.000 0.009 0.000 utf_8.py:15(decode)
  194. 1 0.000 0.000 0.000 0.000 utf_8.py:33(getregentry)
  195. 2192 0.002 0.000 0.002 0.000 util.py:15(__init__)
  196. 6576 0.005 0.000 0.027 0.000 util.py:19(set_dirty)
  197. 4384 0.007 0.000 0.038 0.000 util.py:23(__getattr__)
  198. 2192 0.038 0.000 0.806 0.000 util.py:36(execute)
  199. 2299 0.003 0.000 0.003 0.000 utils.py:128(_route_db)
  200. 4384 0.005 0.000 0.008 0.000 utils.py:86(__getitem__)
  201. 1 0.000 0.000 0.000 0.000 version.py:24(get_version)
  202. 378/1 0.008 0.000 3.620 3.620 views.py:213(serializable_object)
  203. 1 0.000 0.000 3.630 3.630 views.py:237(profileJSON)
  204. 2192 0.016 0.000 0.097 0.000 where.py:130(make_atom)
  205. 2192 0.006 0.000 0.019 0.000 where.py:219(sql_for_columns)
  206. 2192 0.003 0.000 0.003 0.000 where.py:291(__init__)
  207. 2086 0.004 0.000 0.005 0.000 where.py:294(__getstate__)
  208. 2086 0.007 0.000 0.020 0.000 where.py:308(__setstate__)
  209. 2192 0.003 0.000 0.015 0.000 where.py:318(prepare)
  210. 2192 0.019 0.000 0.056 0.000 where.py:323(process)
  211. 2192 0.011 0.000 0.040 0.000 where.py:39(add)
  212. 6576/4384 0.022 0.000 0.127 0.000 where.py:74(as_sql)
  213. 2 0.000 0.000 0.001 0.000 {__import__}
  214. 2463 0.007 0.000 0.007 0.000 {_codecs.utf_8_decode}
  215. 3 0.000 0.000 0.000 0.000 {all}
  216. 72729 0.054 0.000 0.054 0.000 {built-in method __new__ of type object at 0x10017ff20}
  217. 2192 0.000 0.000 0.000 0.000 {callable}
  218. 1 0.000 0.000 0.000 0.000 {chr}
  219. 1 0.000 0.000 0.000 0.000 {filter}
  220. 86058/81674 0.046 0.000 0.050 0.000 {getattr}
  221. 54814 0.058 0.000 0.058 0.000 {hasattr}
  222. 332470 0.035 0.000 0.035 0.000 {id}
  223. 90374 0.033 0.000 0.033 0.000 {isinstance}
  224. 32138 0.012 0.000 0.012 0.000 {issubclass}
  225. 4927 0.002 0.000 0.002 0.000 {iter}
  226. 61926/11070 0.013 0.000 3.093 0.000 {len}
  227. 8771 0.009 0.000 0.009 0.000 {map}
  228. 8556 0.037 0.000 0.042 0.000 {method '__reduce_ex__' of 'object' objects}
  229. 42072 0.011 0.000 0.011 0.000 {method 'add' of 'set' objects}
  230. 193306 0.046 0.000 0.046 0.000 {method 'append' of 'list' objects}
  231. 40906 0.009 0.000 0.009 0.000 {method 'copy' of 'dict' objects}
  232. 2193 0.003 0.000 0.003 0.000 {method 'cursor' of 'psycopg2._psycopg.connection' objects}
  233. 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
  234. 2193 0.672 0.000 0.734 0.000 {method 'execute' of 'psycopg2._psycopg.cursor' objects}
  235. 15452 0.004 0.000 0.004 0.000 {method 'extend' of 'list' objects}
  236. 4384 0.027 0.000 0.039 0.000 {method 'fetchmany' of 'psycopg2._psycopg.cursor' objects}
  237. 250323 0.041 0.000 0.041 0.000 {method 'get' of 'dict' objects}
  238. 1 0.000 0.000 0.000 0.000 {method 'get_parameter_status' of 'psycopg2._psycopg.connection' objects}
  239. 2298 0.001 0.000 0.001 0.000 {method 'items' of 'dict' objects}
  240. 2087 0.001 0.000 0.001 0.000 {method 'iteritems' of 'dict' objects}
  241. 8983 0.006 0.000 0.006 0.000 {method 'join' of 'str' objects}
  242. 7392 0.001 0.000 0.001 0.000 {method 'keys' of 'dict' objects}
  243. 1 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects}
  244. 214 0.000 0.000 0.000 0.000 {method 'match' of '_sre.SRE_Pattern' objects}
  245. 4172 0.001 0.000 0.001 0.000 {method 'pop' of 'dict' objects}
  246. 8767 0.004 0.000 0.004 0.000 {method 'pop' of 'list' objects}
  247. 1 0.000 0.000 0.000 0.000 {method 'replace' of 'str' objects}
  248. 4 0.000 0.000 0.000 0.000 {method 'search' of '_sre.SRE_Pattern' objects}
  249. 1 0.000 0.000 0.000 0.000 {method 'set_client_encoding' of 'psycopg2._psycopg.connection' objects}
  250. 2 0.000 0.000 0.000 0.000 {method 'set_isolation_level' of 'psycopg2._psycopg.connection' objects}
  251. 2511 0.003 0.000 0.003 0.000 {method 'split' of 'str' objects}
  252. 44053 0.018 0.000 0.018 0.000 {method 'startswith' of 'str' objects}
  253. 4 0.000 0.000 0.000 0.000 {method 'sub' of '_sre.SRE_Pattern' objects}
  254. 1 0.000 0.000 0.000 0.000 {method 'translate' of 'str' objects}
  255. 15451 0.007 0.000 0.007 0.000 {method 'update' of 'dict' objects}
  256. 4384 0.004 0.000 0.004 0.000 {method 'update' of 'set' objects}
  257. 1 0.003 0.003 0.003 0.003 {psycopg2._psycopg._connect}
  258. 17218 0.012 0.000 0.012 0.000 {range}
  259. 46419 0.017 0.000 0.017 0.000 {setattr}
  260. 2192 0.001 0.000 0.001 0.000 {thread.get_ident}
  261. 4384 0.002 0.000 0.002 0.000 {time.time}
  262. 8771 0.005 0.000 0.005 0.000 {zip}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement