python3性能还低吗_python 的性能之低简直不能忍啊

66

2015-11-03 16:23:19 +08:00

@clino

0.0211880207062

1497 function calls (1482 primitive calls) in 0.022 seconds

Ordered by: standard name

ncalls tottime percall cumtime percall filename:lineno(function)

1 0.000 0.000 0.022 0.022 :1()

1 0.000 0.000 0.022 0.022 Producer.py:17(send)

8 0.000 0.000 0.000 0.000 __init__.py:1130(debug)

1 0.000 0.000 0.000 0.000 __init__.py:1142(info)

9 0.000 0.000 0.000 0.000 __init__.py:1331(getEffectiveLevel)

9 0.000 0.000 0.000 0.000 __init__.py:1345(isEnabledFor)

1 0.000 0.000 0.000 0.000 _weakrefset.py:70(__contains__)

1 0.000 0.000 0.000 0.000 abc.py:128(__instancecheck__)

2 0.000 0.000 0.000 0.000 base_connection.py:141(_check_state_on_disconnect)

1 0.000 0.000 0.000 0.000 base_connection.py:333(_handle_read)

31 0.000 0.000 0.000 0.000 base_connection.py:354(_handle_write)

2 0.000 0.000 0.000 0.000 base_connection.py:368(_init_connection_state)

10 0.000 0.000 0.021 0.002 blocking_connection.py:1146(_send_method)

1 0.000 0.000 0.001 0.001 blocking_connection.py:198(close)

3 0.000 0.000 0.021 0.007 blocking_connection.py:234(process_data_events)

3 0.000 0.000 0.000 0.000 blocking_connection.py:249(process_timeouts)

10 0.000 0.000 0.021 0.002 blocking_connection.py:265(send_method)

2 0.000 0.000 0.000 0.000 blocking_connection.py:313(_adapter_disconnect)

3 0.000 0.000 0.000 0.000 blocking_connection.py:330(_deadline_passed)

3 0.000 0.000 0.021 0.007 blocking_connection.py:341(_handle_read)

2 0.000 0.000 0.000 0.000 blocking_connection.py:364(_check_state_on_disconnect)

34 0.000 0.000 0.000 0.000 blocking_connection.py:373(_flush_outbound)

1 0.000 0.000 0.000 0.000 blocking_connection.py:382(_on_connection_closed)

3 0.000 0.000 0.020 0.007 blocking_connection.py:39(inner)

31 0.000 0.000 0.021 0.001 blocking_connection.py:409(_send_frame)

10 0.000 0.000 0.021 0.002 blocking_connection.py:514(basic_publish)

3 0.000 0.000 0.020 0.007 blocking_connection.py:77(ready)

3 0.000 0.000 0.000 0.000 callback.py:114(add)

64 0.000 0.000 0.000 0.000 callback.py:14(_name_or_value)

1 0.000 0.000 0.000 0.000 callback.py:184(pending)

1 0.000 0.000 0.000 0.000 callback.py:199(process)

7 0.000 0.000 0.000 0.000 callback.py:235(remove)

2 0.000 0.000 0.000 0.000 callback.py:281(_arguments_match)

2 0.000 0.000 0.000 0.000 callback.py:302(_callback_dict)

7 0.000 0.000 0.000 0.000 callback.py:320(_cleanup_callback_dict)

1 0.000 0.000 0.000 0.000 callback.py:367(_should_process_callback)

1 0.000 0.000 0.000 0.000 callback.py:384(_use_one_shot_callback)

18/10 0.000 0.000 0.000 0.000 callback.py:47(wrapper)

14/7 0.000 0.000 0.000 0.000 callback.py:70(wrapper)

11 0.000 0.000 0.000 0.000 channel.py:566(is_open)

2 0.000 0.000 0.000 0.000 connection.py:1029(_has_open_channels)

1 0.000 0.000 0.000 0.000 connection.py:1039(_has_pending_callbacks)

2 0.000 0.000 0.000 0.000 connection.py:1049(_init_connection_state)

1 0.000 0.000 0.000 0.000 connection.py:1098(_is_connection_close_frame)

1 0.000 0.000 0.000 0.000 connection.py:1109(_is_method_frame)

1 0.000 0.000 0.000 0.000 connection.py:1272(_on_data_available)

1 0.000 0.000 0.000 0.000 connection.py:1309(_process_callbacks)

1 0.000 0.000 0.000 0.000 connection.py:1337(_process_frame)

1 0.000 0.000 0.000 0.000 connection.py:1367(_read_frame)

12 0.000 0.000 0.000 0.000 connection.py:1387(_remove_callback)

4 0.000 0.000 0.000 0.000 connection.py:1397(_remove_callbacks)

4 0.000 0.000 0.000 0.000 connection.py:1408(_remove_connection_callbacks)

1 0.000 0.000 0.000 0.000 connection.py:1414(_rpc)

1 0.000 0.000 0.000 0.000 connection.py:1441(_send_connection_close)

31 0.000 0.000 0.001 0.000 connection.py:1475(_send_frame)

11 0.000 0.000 0.021 0.002 connection.py:1494(_send_method)

4 0.000 0.000 0.000 0.000 connection.py:1521(_set_connection_state)

1 0.000 0.000 0.000 0.000 connection.py:1541(_trim_frame_buffer)

33 0.000 0.000 0.000 0.000 connection.py:746(is_closed)

2 0.000 0.000 0.000 0.000 connection.py:753(is_closing)

5 0.000 0.000 0.000 0.000 connection.py:760(is_open)

2 0.000 0.000 0.000 0.000 connection.py:841(_add_connection_start_callback)

1 0.000 0.000 0.000 0.000 connection.py:852(_append_frame_buffer)

1 0.000 0.000 0.000 0.000 connection.py:860(_buffer_size)

1 0.000 0.000 0.000 0.000 connection.py:900(_close_channels)

10 0.000 0.000 0.000 0.000 frame.py:118(__init__)

10 0.000 0.000 0.000 0.000 frame.py:128(marshal)

1 0.000 0.000 0.000 0.000 frame.py:192(decode_frame)

32 0.000 0.000 0.000 0.000 frame.py:20(__init__)

31 0.000 0.000 0.000 0.000 frame.py:30(_marshal)

12 0.000 0.000 0.000 0.000 frame.py:58(__init__)

11 0.000 0.000 0.000 0.000 frame.py:68(marshal)

10 0.000 0.000 0.000 0.000 frame.py:86(__init__)

10 0.000 0.000 0.000 0.000 frame.py:98(marshal)

1 0.000 0.000 0.000 0.000 socket.py:192(close)

31 0.000 0.000 0.000 0.000 socket.py:223(meth)

10 0.000 0.000 0.000 0.000 spec.py:1792(__init__)

10 0.000 0.000 0.000 0.000 spec.py:1828(encode)

1 0.000 0.000 0.000 0.000 spec.py:2481(__init__)

10 0.000 0.000 0.000 0.000 spec.py:2638(encode)

1 0.000 0.000 0.000 0.000 spec.py:387(__init__)

1 0.000 0.000 0.000 0.000 spec.py:414(encode)

1 0.000 0.000 0.000 0.000 spec.py:431(__init__)

1 0.000 0.000 0.000 0.000 spec.py:438(decode)

1 0.000 0.000 0.000 0.000 utils.py:8(is_callable)

116 0.000 0.000 0.000 0.000 {_struct.pack}

1 0.000 0.000 0.000 0.000 {_struct.unpack_from}

1 0.000 0.000 0.000 0.000 {_struct.unpack}

2 0.000 0.000 0.000 0.000 {any}

3 0.020 0.007 0.020 0.007 {built-in method poll}

32 0.000 0.000 0.000 0.000 {chr}

32 0.000 0.000 0.000 0.000 {getattr}

169 0.000 0.000 0.000 0.000 {isinstance}

64 0.000 0.000 0.000 0.000 {issubclass}

164 0.000 0.000 0.000 0.000 {len}

10 0.000 0.000 0.000 0.000 {math.ceil}

31 0.000 0.000 0.000 0.000 {method 'append' of 'collections.deque' objects}

89 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects}

1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}

21 0.000 0.000 0.000 0.000 {method 'insert' of 'list' objects}

31 0.000 0.000 0.000 0.000 {method 'join' of 'str' objects}

8 0.000 0.000 0.000 0.000 {method 'keys' of 'dict' objects}

31 0.000 0.000 0.000 0.000 {method 'popleft' of 'collections.deque' objects}

1 0.000 0.000 0.000 0.000 {method 'recv' of '_socket.socket' objects}

31 0.000 0.000 0.000 0.000 {method 'sendall' of '_socket.socket' objects}

10 0.000 0.000 0.000 0.000 {range}

6 0.000 0.000 0.000 0.000 {setattr}

5 0.000 0.000 0.000 0.000 {time.time}

就是 pika 库的问题啊,时间全耗在它上面了,不过为什么只在我本机才会出现这种情况,感觉没法分析啊。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值