couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <>
Subject Re: Profiling views
Date Fri, 12 Jun 2009 13:12:50 GMT
On Jun 11, 2009, at 6:04 PM, Jan Lehnardt wrote:

> On 10 Jun 2009, at 18:34, Simon Metson wrote:
>> Hi All,
>> 	I was wondering if there was any way of profiling views without  
>> using a lot of log() statements. The application we are developing  
>> needs a lot of analytic information (who's querying what, how long  
>> a view takes to generate, if a query comes in that doesn't map to a  
>> view etc.) and having some decent timing reports on which views in  
>> a design document are taking up time would be really handy, so that  
>> we can set/manage update policy, cache policies etc.
>> Cheers
>> Simon
>> PS.  My hope is that a lot (all?) of this analytic stuff can be  
>> done as a generic couchapp and made publicly available. Will try  
>> and keep people posted as things start to materialise...
> We could add per-view timing info to the runtime stats. Do you feel  
> comfortable digging in the erlang and adding the necessary calls?

I agree that we should have higher-granularity timing information and  
statistics available.

Not to hijack Simon's thread, but Paul and I were wondering if  
features like stats and active tasks ought to be consuming  
standardized update notifications instead of inserting their own calls  
into the lower-level core DB code.  I think it's a good idea, and  
probably  one that we should talk about before adding too much extra  
stats code.  If we put enough detail into the update notifications we  
could add lots of different types of statistics just by consuming  
these messages.  That way only one person needs to dig into the  
entrails of couch_view_updater.  Best,


View raw message