Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python “什么是”呢;{method';recv#u进入';的';套接字';对象}”;在Cprofile结果中?如何减少其时间消耗?_Python - Fatal编程技术网

Python “什么是”呢;{method';recv#u进入';的';套接字';对象}”;在Cprofile结果中?如何减少其时间消耗?

Python “什么是”呢;{method';recv#u进入';的';套接字';对象}”;在Cprofile结果中?如何减少其时间消耗?,python,Python,这是我的python代码的评测结果 正如您在下面看到的,方法'recv_into'of'_socket.socket'对象花费了太多的时间(tottime为17.265) 这是什么?有没有办法缩短它的时间 什么时候叫 ncalls tottime percall cumtime percall filename:lineno(function) 1 0.402 0.402 37.668 37.668 c:\Users\user\Google ��

这是我的python代码的评测结果

正如您在下面看到的,方法'recv_into'of'_socket.socket'对象花费了太多的时间(tottime为17.265)

这是什么?有没有办法缩短它的时间

什么时候叫

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.402    0.402   37.668   37.668 c:\Users\user\Google ����̺�\Business\Project\Jessica Project\jessica-1\simulation\simulatorW.py:239(backtestWithArgumentsList)
        1    0.173    0.173   26.762   26.762 c:\Users\user\Google ����̺�\Business\Project\Jessica Project\jessica-1\simulation\simulatorW.py:110(getPrices)
        1    0.000    0.000   26.588   26.588 c:\Users\user\Google ����̺�\Business\Project\Jessica Project\jessica-1\dto\__init__.py:5(__init__)
        1    1.734    1.734   25.380   25.380 c:\Users\user\Google ����̺�\Business\Project\Jessica Project\jessica-1\dto\__init__.py:21(priceInfoListToDeque)
   815679    2.204    0.000   23.473    0.000 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\cursor.py:1152(next)
       13    0.021    0.002   20.631    1.587 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\cursor.py:1039(_refresh)
       12    0.008    0.001   20.609    1.717 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\cursor.py:937(__send_message)
       12    0.000    0.000   20.601    1.717 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\mongo_client.py:1306(_run_operation_with_response)
       12    0.000    0.000   20.601    1.717 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\mongo_client.py:1437(_retryable_read)
       12    0.000    0.000   20.597    1.716 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\mongo_client.py:1334(_cmd)
       12    0.001    0.000   20.597    1.716 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\server.py:70(run_operation_with_response)
       18    0.001    0.000   17.386    0.966 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\network.py:192(receive_message)
       12    0.013    0.001   17.379    1.448 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\pool.py:637(receive_message)
       36    0.066    0.002   17.331    0.481 C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\pymongo\network.py:249(_receive_data_on_socket)
    19984   17.265    0.001   17.265    0.001 {method 'recv_into' of '_socket.socket' objects}
        1    2.499    2.499    6.522    6.522 c:\Users\user\Google ����̺�\Business\Project\Jessica Project\jessica-1\simulation\simulatorW.py:138(filterIndicesWithTimeCondition)

你能分享你的代码的一个功能示例吗?请分享你的代码示例