1140004 function calls in 9.800 CPU seconds Ordered by: internal time ncalls tottime percall cumtime percall filename:lineno(function) 20000 1.250 0.000 1.250 0.000 :0(send) 20000 0.630 0.000 9.610 0.000 collection.py:187(update) 20000 0.570 0.000 2.990 0.000 message.py:77(update) 20000 0.560 0.000 5.360 0.000 connection.py:505(_send_message) 20000 0.470 0.000 1.020 0.000 thread_util.py:30(acquire) 20000 0.420 0.000 1.210 0.000 message.py:48(__pack_message) 20000 0.400 0.000 1.580 0.000 thread_util.py:85(release) 100000 0.360 0.000 0.360 0.000 :0(acquire) 20000 0.330 0.000 1.560 0.000 connection.py:446(__get_socket) 20000 0.320 0.000 1.660 0.000 connection.py:469(__send_data_on_socket) 20000 0.310 0.000 0.390 0.000 collection.py:109(full_name) 20000 0.310 0.000 0.380 0.000 random.py:148(randrange) 40000 0.310 0.000 0.780 0.000 bson.py:551(from_dict) 20000 0.260 0.000 0.980 0.000 threading.py:329(set) 40000 0.260 0.000 0.260 0.000 :0(_dict_to_bson) 20000 0.250 0.000 0.490 0.000 threading.py:236(notify) 20000 0.230 0.000 0.390 0.000 bson.py:64(_make_c_string) 80000 0.230 0.000 0.230 0.000 :0(isinstance) 80000 0.210 0.000 0.210 0.000 :0(pack) 80000 0.200 0.000 0.200 0.000 :0(release) 1 0.190 0.190 9.800 9.800 mongo_test.py:82(test_update) 80000 0.190 0.000 0.190 0.000 :0(len) 20000 0.160 0.000 0.540 0.000 random.py:212(randint) 40000 0.160 0.000 0.160 0.000 threading.py:326(isSet) 20000 0.160 0.000 0.180 0.000 threading.py:672(currentThread) 20000 0.150 0.000 0.660 0.000 threading.py:253(notifyAll) 20000 0.150 0.000 0.270 0.000 threading.py:337(clear) 40000 0.140 0.000 0.210 0.000 bson.py:541(__new__) 20000 0.120 0.000 0.180 0.000 threading.py:186(_is_owned) 20000 0.100 0.000 0.100 0.000 :0(encode) 20000 0.080 0.000 0.080 0.000 database.py:97(name) 20000 0.070 0.000 0.070 0.000 database.py:92(connection) 40000 0.070 0.000 0.070 0.000 :0(__new__) 20000 0.070 0.000 0.070 0.000 :0(random) 20000 0.060 0.000 0.060 0.000 threading.py:44(_note) 20000 0.030 0.000 0.030 0.000 :0(get) 20000 0.020 0.000 0.020 0.000 :0(get_ident)