NHProf - possible misleading transaction messages

25 views
Skip to first unread message

DanPlaskon

unread,
Sep 29, 2010, 5:20:46 PM9/29/10
to nhprof
It would appear that the logging for transactions is somewhat
inaccurate in the NHibernate source, and I'm assuming that this is
causing an inaccurate statement to be fed to NHProf.

Basically, if you have a look at the logging in the
Nhibernate.Transactions.AdoTransaction source, you'll note that the
isolation level is logged before a default has been set from
configuration (if it exists there). This causes NHProf to report an
isolation level of "unspecified" even when it *has* been specified via
configuration.

For further discussing, see this stack overflow question and my
answer:

http://stackoverflow.com/questions/3697592/cannot-set-a-default-nhibernate-isolation-level-eg-via-mapping

DanPlaskon

unread,
Sep 29, 2010, 5:32:02 PM9/29/10
to nhprof
On a second glance, it would appear that this has been fixed in the
trunk version; so I'm guessing it will only be an issue for NHibernate
2.xx. As such, I'm guessing this is a non-issue moving forward. A bit
of a bummer than Nhibernate 2.xx users will still see this though.
> http://stackoverflow.com/questions/3697592/cannot-set-a-default-nhibe...

Ayende Rahien

unread,
Oct 8, 2010, 1:06:45 AM10/8/10
to nhprof
Yes, there isn't really much that we can do if NH gives us the wrong information.
OTOH, 3.0 Beta is just around the corner :-)


--
You received this message because you are subscribed to the Google Groups "nhprof" group.
To post to this group, send email to nhp...@googlegroups.com.
To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhprof?hl=en.


DanPlaskon

unread,
Oct 17, 2010, 8:08:50 AM10/17/10
to nhprof
Ayende,

Was just thinking about this...perhaps there is somewhere that the
default level *is* logged (eg. would it be logged during session
factory configuration, etc?) it may be possible to get that info there
and store if for susequent transactions. Although I'm guessing,
probably not worth the effort?
> > nhprof+un...@googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/nhprof?hl=en.- Hide quoted text -
>
> - Show quoted text -

Ayende Rahien

unread,
Oct 17, 2010, 8:25:29 AM10/17/10
to nhp...@googlegroups.com
It would be quite hard to do
And it wouldn't work when you have multiple factories

> To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.

DanPlaskon

unread,
Oct 18, 2010, 6:55:29 AM10/18/10
to nhprof
Don't sessions provide a reference to their SessionFactory via the
ISession interface? I won't pretend to know how NHProf works under the
covers; but wouldn't this allow you to differentiate the session
factories if multiple ones existed?
> >> >http://groups.google.com/group/nhprof?hl=en.-Hide quoted text -
>
> >> - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups "nhprof" group.
> > To post to this group, send email to nhp...@googlegroups.com.
> > To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/nhprof?hl=en.- Hide quoted text -

Ayende Rahien

unread,
Oct 18, 2010, 8:01:26 AM10/18/10
to nhprof
Not quite, I am not actually working on top of the live instances, I am working on top of the logged data stream.

DanPlaskon

unread,
Oct 18, 2010, 8:36:31 AM10/18/10
to nhprof
I figured this might be the case...I wonder if some form of warning
message (or augmentation of the transaction message) would be a viable
option here then? eg. making it clear that the transaction level *may*
not be unspecified if reported by Nhibernate 2.x?
> > <nhprof%2Bunsu...@googlegroups.com<nhprof%252Bunsubscribe@googlegroups.­com>
>
> > > >> > .
> > > >> > For more options, visit this group at
> > > >> >http://groups.google.com/group/nhprof?hl=en.-Hidequoted text -
>
> > > >> - Show quoted text -
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups "nhprof" group.
> > > > To post to this group, send email to nhp...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > nhprof+un...@googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/nhprof?hl=en.- Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nhprof" group.
> > To post to this group, send email to nhp...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > nhprof+un...@googlegroups.com<nhprof%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
Reply all
Reply to author
Forward
0 new messages