On Monday, 6 October 2014 10:44:59 UTC-7, Jonathan Vanasco wrote:
>
>
> On Thursday, October 2, 2014 11:01:33 PM UTC-4, Bert JW Regeer wrote:
>>
>> This seems like functionality that any ol’ profiler should be able to 
>> give you, and wouldn’t require any changes in Pyramid. 
>
>
> Mostly, yes.  For my personal needs, I can backtrack data out of this on 
> my dev environment via the profiler integration on debug_toolbar.   I could 
> probably do this on production using repoze.profile as Tres suggested. 
>  It's worked well enough, but a bit of a pain.
>
> I was just thinking about the community needs though.  The profiler 
> information doesn't map to any sort of lifecycle data.  using the 
> debug_toolbar as an example -- the most standard data you can find is 
> `<pyramid/router.py:66(handle_request)>`.  Because pages could be rendered 
> different ways (view_config, render_to_response, etc), there is no one-size 
> fits all solution.  All other calls are either "developer code" or various 
> supporting library functions that don't map to any specific business logic. 
>  application profiling is, essentially, a highly customized task.
>
> if there were some sort of internal reporting at key request lifecycle 
> events, then high-level application profiling would be fairly standardized. 
>  it would be easy to see that a bottleneck was in the view, the database, 
> the template or auth.  
>
 
I find these sort of high level timings helpful, so I implemented a simple 
tween to record total time and set a header, and allow various parts of my 
app to report timings (db time, elasticsearch time, node.js rendering time, 
with what's left over assumed to be spent in app code.)

https://github.com/ENCODE-DCC/encoded/blob/v17.0/src/encoded/stats.py

Laurence

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to