On Thursday, June 11, 2015 at 11:29:01 PM UTC-7, Niphlod wrote:
>
> from what I remember runsnakerun has the entire call stack. It's not hard 
> to identify where is the bottleneck. 
>

The cprofilev tool in the OP also allows drilling down; the default view 
shows all levels, but by clicking on function names there is a drill-down 
that shows how many times  function X is called, and also what it calls.  
Repeat drilling to get further in.

(I missed something in trying to set up runsnake in a virtenv; "import wx" 
kept failing, so I can't compare the tools, but the sample picture on the 
site was intriguing.)

BTW: a read() such as in socket.read() is hardly something that needs fixing
>

I gather that identifying painful queries is of value, and either figuring 
out how to do them less often or rewriting the query to be less painful, 
but my stuff is much to simple for me to have gotten into that yet.

/dps
 

> .
>
> On Friday, June 12, 2015 at 7:11:44 AM UTC+2, mweissen wrote:
>>
>> A second question:
>>
>> I have found that a read-command consumes a lot of time. All other 
>> statements are not conspicuous.
>>
>>
>>
>> ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>>  1    2.939    2.939    2.939    2.939 {built-in method read}
>>  1    5.080    5.080    5.080    5.080 {built-in method read}
>>  1    5.669    5.669    5.669    5.669 {built-in method read}
>>  1    2.083    2.083    2.083    2.083 {built-in method read}
>>  4    2.752    0.688    2.752    0.688 {built-in method read}
>>  4    2.473    0.618    2.473    0.618 {built-in method read}
>>
>> But the profiler does not tell me which read statement makes trouble.
>> Any hints how to find the malefactor?
>>
>>
>>
>> 2015-06-12 6:57 GMT+02:00 Martin Weissenboeck <mwei...@gmail.com>:
>>
>>> Thank you very much for your fast response.
>>>
>>> 2015-06-11 21:15 GMT+02:00 Niphlod <nip...@gmail.com>:
>>>
>>>> runsnakerun is the best tool for the job. 
>>>> for running with profiler and another webserver, you need to tweak 
>>>> wsgihandler.py .... pass a directory to profiler_dir
>>>>
>>>>
>>>> On Thursday, June 11, 2015 at 8:39:45 PM UTC+2, mweissen wrote:
>>>>>
>>>>>
>>>>> ​I have tried the option -F with a simple web2py start:
>>>>> python web2py.py -F profilerdir...
>>>>> Works fine, no problem.
>>>>>
>>>>> But now I want to do the same with nginx and emperor: where is the 
>>>>> place to add the -F parameter?
>>>>>
>>>>> And, by the way, is there a web2py app to read and display the *.prof 
>>>>> files? I have only found cprofilev (
>>>>> https://github.com/ymichael/cprofilev).
>>>>>
>>>>> Regards, Martin​
>>>>>
>>>>>  
>>
>> 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to