Posts
1150
Comments
891
Trackbacks
1
Hibernating Rhinos’ Entity Framework Profiler Mini Review

This doesn’t really constitute a review, just a couple of comments, but whatever.

In some previous posts, I had talked about my experience with Hibernating Rhinos’ Linq to Sql profiler.  Basically, it failed for me, didn’t even function properly, and Ayende was unable to help.

Anyway, I’m working on something that uses Entity Framework, so I figured, what the hell, I’ve give it one more shot, I’ll just get the EF Profiler, and not the entire suite, and see how it works.  I can expense it.

So, the first thing I did, obviously, was hook it up and see if it, well, you know, actually functioned.

That all went fine, which is obviously a good thing.  I profiled the web application for a little bit.  No red alerts, good.  I sort of expected at least one or two, since I suck as a developer, so was glad to get some warm fuzzies.  There were some of those annoying grey ‘unbounded result set’ alerts, but you can ignore them, turn them off, etc.

But, like most sucky developers, I put it away and figured I’d profile everything at the end.

And then, while I was working on something, I realized that the SQL my Entity Framework code was producing was wrong, as there was a serious bug in how some functionality was working.

Now, any decent SQL person will recognize the following as fairly typical when trying to figure out annoying SQL issues:  fire up SQL Profiler, create a trace, work through the UI to reproduce the bug, save off the trace to a table, do some querying to find out what SQL is being generated, and then figure out what’s up.  This isn’t difficult, by any stretch of the imagination, but it does take some work.

I figured, what the hell, if EF Profiler is any good, it should really help in a situation like this, without me needing to do much.

So, I fired it up, and worked through the UI to reproduce the bug. 

Well now.  There’s the details of the query.  And the stack trace.  And you can jump to the code.  Well, sometimes.  Other times, it just says it can’t find the source file.  I only just noticed this now, it worked before.

But, from the query details, I can see that Johnny Dumbass Developer forgot to manage null properly.  Bad Johnny Dumbass.  30 seconds later, work through the UI, bug gone.

Not bad.  I’m not sure why the source file can’t be found.  I still hate that the damn thing tries to auto-update even though I don’t want it to.  There’s still a little too much friction from the get go with it.

But, it probably saved me quite some time here, so I definitely don’t feel terrible about it like I used to.

posted on Tuesday, June 18, 2013 8:04 PM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 5 and 6 and type the answer here: