<div class="gmail_extra"><br><br><div class="gmail_quote">2012/4/27 黄 轶明 <span dir="ltr"><<a href="mailto:hoooooosety@gmail.com" target="_blank">hoooooosety@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How can i use cProfile with twisted?<br>
<br>
Is there any guide or example?<br>
<br>
Thank you very much. I googled and stackoverflowed ,but didn't find any examples.<br>
<br>
<br>
在 2012-4-26,下午6:00, Itamar Turner-Trauring 写道:<br>
<div class="HOEnZb"><div class="h5"><br>
> On 04/26/2012 02:14 AM, 黄 轶明 wrote:<br>
>> hi<br>
>><br>
>> I use twisted to build some web services, using twistd to start a application.<br>
>><br>
>> When I start the twistd, and without any connection, the cpu usage of twistd process comes to about 10%.<br>
>><br>
>> I don't think it's normal. I think it should be much low than this num.<br>
>><br>
>> But I don't know how to find the problem is.Would anyone be pleased to help me?<br>
>><br>
> Twisted doesn't use 10% CPU by default; chances are it's some code you<br>
> wrote. Have you tried using a profiler (e.g. cProfile)?<br>
><br>
> _______________________________________________<br>
> Twisted-Python mailing list<br>
> <a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
> <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br></div><div class="gmail_extra">Hi</div><div class="gmail_extra"><br></div><div class="gmail_extra"> you may look at <a href="http://docs.python.org/library/profile.html">http://docs.python.org/library/profile.html</a> for some details.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Regards</div><div class="gmail_extra"><br></div><div class="gmail_extra">gelin yan</div>