Questions tagged [nhprof]

A profiler designed specifically for NHibernate.

25 questions
11
votes
4 answers

NHibernate Profiler - large discrepancy between database duration and total duration?

I have an application that makes extensive use of NHibernate. I've started using the NHibernate Profiler to identify possible performance issues. My question is related to the Query Durations statistic. The stat is broken down in Database Duration…
Mark Sherretta
  • 10,160
  • 4
  • 37
  • 42
8
votes
1 answer

Count number of queries executed by NHibernate in a unit test

In some unit/integration tests of the code we wish to check that correct usage of the second level cache is being employed by our code. Based on the code presented by Ayende…
Bittercoder
  • 11,753
  • 10
  • 58
  • 76
6
votes
1 answer

Automated profiling/unit testing the NHibernate behaviors

I'm using NHibernate quite intensively for few months and I find it very powerful, but for me this is the kind of tool that can sometimes hurt you. I had a lot of situations that relatively simple change in mapping, in LINQ query or in any code that…
NOtherDev
  • 9,542
  • 2
  • 36
  • 47
5
votes
3 answers

NHibernate Profiler doesn't see request from my ASP.NET MVC application

I'm using NHProf with ASP.NET MVC 3. I inserted HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); in my Application_Start method, but NHProf still doesn't see my sessions and doesn't show up anything. What could be…
GaGar1n
  • 1,040
  • 2
  • 10
  • 17
4
votes
1 answer

fail-safe cleanup (collections) warning after committing transaction with NHibernate

When looking in NHProfiler I get following warning after committing my transaction: fail-safe cleanup (collections) : NHibernate.Engine.Loading.CollectionLoadContext I have absolutely no idea what this could be or how I can solve this. Can somebody…
Jelle
  • 322
  • 3
  • 14
4
votes
2 answers

NHibernate taking a long time to run query

This is being done using Fluent NHibernate I've got a NHibernate lookup that is retrieving data from one table. If i take the generated sql and run it through query analyzer, it takes ~18ms to run. Using NHProfiler, i'm getting the duration of this…
dave clements
  • 1,505
  • 2
  • 13
  • 28
4
votes
2 answers

Does anyone know why I'm getting this warning from NHibernate/NH Profiler?

"Disabled lazy properies fetching for fully_qualified_type_name beacuse it does not support lazy at the entity level". This warning was reported by NH Profiler, and as a result, I'm experiencing the dreaded SELECT N + 1 side affect. So if 2200…
A-Dubb
  • 1,670
  • 2
  • 17
  • 22
3
votes
1 answer

NHibernate Profiler is lying to me?

Im using Fluent NHibernate as my ORM and NH Profiler is throwing me this sql query when I execute it INSERT INTO [Location] (Name, Lat, Lon) VALUES ('my address' /* @p0 */, -58.37538459999996 /* @p1 */, …
2
votes
2 answers

Load vs Get in Nhibernate

The master page in my web application does authentication and loads up the user entity using a Get. After this whenever the user object is needed by the usercontrols or any other class I do a Load. Normally nhibernate is supposed to load the…
Quintin Par
  • 15,862
  • 27
  • 93
  • 146
2
votes
1 answer

Could not write to output file 'c:\Windows\Temp\HibernatingRhinos.Profiler.Appender.NHibernate3Logger.dll' -- 'Access is denied. '

We have a Website and two services hosted in IIS7 as UAT/STG and LIVE Since updating NHProf the staging site and UAT sites have died with the following error. net4exception: System.InvalidOperationException: Could not write to output file…
Chris McKee
  • 4,298
  • 10
  • 48
  • 83
2
votes
1 answer

NHibernate, ActiveRecord, Transaction database locks and when Commits are flushed

This is a common question, but the explanations found so far and observed behaviour are some way apart. We have want the following nHibernate strategy in our MVC website: A SessionScope for the request (to track changes) An…
penderi
  • 8,673
  • 5
  • 45
  • 62
1
vote
1 answer

nhibernate - nhprof -unbounded result set on lazy load for a one to many bi-directional association

I have a standard Category domain entity which has corresponding children. i.e category and its corresponding sub categories. This is shown below. Pretty standard stuff really. public class Category : Entity { private…
dezzy
  • 479
  • 6
  • 18
1
vote
1 answer

In an NHibernate NamedQuery, how do you use a DateTimeOffset as a parameter

When I run a NamedQuery in NHibernate, if I set a DateTimeOffset using SetParameter("name", date) or SetParameter("name", date, new DateTimeOffsetType()), it loses the time offset information when sending the query ('2011-01-01T14:00:00.00'). Does…
blakeb
  • 21
  • 3
1
vote
2 answers

NHProf generates 'this statement executed from the view' warning when I pass a ViewModel object to my ASP.NET MVC View page

I just noticed that on one page of my site, where I pass a ViewModel to my View page, NHProf is giving the following warning: This statement executed from the view, which can result in bad performance and/or brittle behaviour. It then links to…
marcusstarnes
  • 6,393
  • 14
  • 65
  • 112
1
vote
1 answer

NHProf C# API -- determine if profiler has been initialized

In code, you initialize the NHibernateProfiler with this call: HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); Is there a way to determine if a profile has been initialized or not? I was looking for something…
kdawg
  • 2,019
  • 21
  • 31
1
2