List Info

Thread: Re: How to use querylog plugin...




Re: How to use querylog plugin...
country flaguser name
Italy
2007-09-14 03:48:07
Marcello Romani ha scritto:
> Matt S Trout ha scritto:
>> On Wed, Sep 12, 2007 at 04:13:36PM +0200, Marcello
Romani wrote:
>>> Hallo,
>>>     I've installed C::P::QueryLog and installed
the template provided 
>>> by the pod doc, but I always get 0.00 seconds
of elapsed time, no 
>>> matter how many db accesses I do.
>>
>> Uninstall it and use the replacement model mixin
the author wrote after
>> discussions on here about why it shouldn't have
been a plugin.
>>
> 
> Well in fact I'm not using that pulgin at all... (I
just installed it - 
> sorry for not thinking twice before writing).
> I'm testing it in two separate ways: by using 
> C::M:BIC::Sch
ema::QueryLog as base class for my model class, and by 
> attaching a DBIx::Class::QueryLog object to the $schema
instance.
> 
> The problem is that the querylog object doesn't
collecte any data (or so 
> it seems to me, since the stats are all zero...)
> 
> I think I'll build a simple "dummy" app just
for testing the querylog, 
> so I get to "know" it (I'm trying to use it
in a non-trivial app). 
> Sometimes in order to solve a problem you need to
isolate it...
> 
> Thanks.
> 

Ok, I've written a very small app that only has one table 
(users(id,name,email)) and a couple of methods (create,
list). The app's 
model use base C::M:BIC::Sch
ema::QueryLog.
Now my problem is how to obtain the querylog object used in
the template 
from the docs...

Thanks.

-- 
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com


_______________________________________________
List: Catalystlists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalystlists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/

Re: How to use querylog plugin...
country flaguser name
Italy
2007-09-18 10:28:17
Marcello Romani ha scritto:
> Marcello Romani ha scritto:
>> Matt S Trout ha scritto:
>>> On Wed, Sep 12, 2007 at 04:13:36PM +0200,
Marcello Romani wrote:
>>>> Hallo,
>>>>     I've installed C::P::QueryLog and
installed the template 
>>>> provided by the pod doc, but I always get
0.00 seconds of elapsed 
>>>> time, no matter how many db accesses I do.
>>>
>>> Uninstall it and use the replacement model
mixin the author wrote after
>>> discussions on here about why it shouldn't have
been a plugin.
>>>
>>
>> Well in fact I'm not using that pulgin at all... (I
just installed it 
>> - sorry for not thinking twice before writing).
>> I'm testing it in two separate ways: by using 
>> C::M:BIC::Sch
ema::QueryLog as base class for my model class, and by 
>> attaching a DBIx::Class::QueryLog object to the
$schema instance.
>>
>> The problem is that the querylog object doesn't
collecte any data (or 
>> so it seems to me, since the stats are all
zero...)
>>
>> I think I'll build a simple "dummy" app
just for testing the querylog, 
>> so I get to "know" it (I'm trying to use
it in a non-trivial app). 
>> Sometimes in order to solve a problem you need to
isolate it...
>>
>> Thanks.
>>
> 
> Ok, I've written a very small app that only has one
table 
> (users(id,name,email)) and a couple of methods (create,
list). The app's 
> model use base C::M:BIC::Sch
ema::QueryLog.
> Now my problem is how to obtain the querylog object
used in the template 
> from the docs...
> 
> Thanks.
> 

For future reference: if the model is

MyApp::Model::Main

then one can access the querylog object by calling:

$c->model('Main')->querylog

-- 
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com


_______________________________________________
List: Catalystlists.rawmode.org
Listinfo: ht
tp://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-
archive.com/catalystlists.rawmode.org/
Dev site: http://dev.catalyst.per
l.org/

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )