Well,
you can use the builtin session statistic of nibernate. Unfortunately, it 
is global and not exchangeable.
If you are willing to built a custom nhibernate version, you could extend 
it as I described here:

https://groups.google.com/d/msg/nhibernate-development/F43LG_nITSc/5ZaCoU0Bw28J

This gives you a rather detailed statistic on a per session level.
best regards,
Peter


Am Donnerstag, 5. Dezember 2013 23:16:53 UTC+1 schrieb Michał Gajek:
>
> Hi,
> how is it possible to log SQL execution time? Is it possible to do it via 
> logging (like logging almost-raw SQL with log4net), or maybe custom logger 
> (IInternalLogger) or via hooks?
>
> I'm aware of NHProf and other great tools, but I need to capture the time 
> in the code for custom stats processing.
>
> All the answers I've found so far either point profiling tools or suggest 
> using %d parameter in log4net (which is wrong, %d is the "current time" at 
> the moment of running action, not the timespan of how long the action took 
> to execute. I believe the only parameter passed from NHibernate is %m 
> [message] - which is quite obvious.)
>
> Thanks in advance
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to