Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleMongo profiling
linenumberstrue
collapsetrue
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
124398 0.613 0.000 36.018 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:1338(_send_message_with_response)
124398 0.832 0.000 28.110 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:1325(__send_and_receive)
155975 1.104 0.000 24.286 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:1301(__receive_message_on_socket)
311950 23.183 0.000 23.183 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:1286(__receive_data_on_socket)
27986 0.308 0.000 8.371 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:1239(_send_message)
152388 0.357 0.000 3.581 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:1039(__socket)
184223 0.382 0.000 2.607 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:908(__ensure_member)
3591 0.017 0.000 2.098 0.001 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:971(__find_node)
3591 0.050 0.000 2.081 0.001 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:837(__try_node)
2731 0.124 0.000 1.955 0.001 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:94(__init__)
31814 0.027 0.000 1.806 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py:1067(_ensure_connected)


We also spend a lot of time in opaque_keys - ~155 seconds of a 970 second run or ~16%. The individual calls seem fast enough, but there are a tremendous number of them. 

Code Block
languagepy
titleTop 20 opaque_keys time consumers
linenumberstrue
collapsetrue
ncalls  tottime  percall  cumtime  percall filename:lineno(function)
2769040 10.467 0.000 53.938 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:315(replace)
15760319 31.148 0.000 52.500 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:370(_key)
10142091/5331316 8.695 0.000 41.409 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:388(__hash__)
768933 3.852 0.000 39.446 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locator.py:648(replace)
1342272 12.665 0.000 36.051 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locator.py:154(__init__)
2872665/2118836 6.545 0.000 31.678 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:376(__eq__)
2365120 5.563 0.000 25.925 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:270(__init__)
81417359 21.336 0.000 21.336 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:374(<genexpr>)
241334/241326 1.243 0.000 15.608 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:176(from_string)
2365120 7.379 0.000 15.512 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:308(_unchecked_init)
267368 0.428 0.000 15.204 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locations.py:175(_from_deprecated_son)
6350845 3.206 0.000 13.940 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:326(<genexpr>)
969493 2.665 0.000 13.857 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locator.py:635(__init__)
95596 0.537 0.000 13.291 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locator.py:283(make_usage_key_from_deprecated_string)
14488043 12.980 0.000 12.983 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:332(__setattr__)
267368 1.222 0.000 12.923 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locator.py:1013(_from_deprecated_son)
194907 1.658 0.000 9.195 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locator.py:965(_from_deprecated_string)
655164 0.924 0.000 7.415 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/edx/locator.py:320(for_branch)
385902 0.245 0.000 7.020 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:379(__ne__)
989454/989450 1.065 0.000 5.798 0.000 /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/opaque_keys/__init__.py:167(__str__)

Modulestore Tests

There are 724 tests in modulestore/tests that account for ~410 seconds of test time. From a local run of:

...