Is there a way to count SQL transactions in an ASP.NET Request/Response cycle?
Is there a way to count SQL transactions in an ASP.NET Request/Response cycle? In other words, is there some simple bit of code you can wire into an HttpModule at starts and ends counting in the events of my choice?
The background here is that I was chatting with some people about performance testing in a fairly complex app. We've got a fair bit of caching involved, but it would be nice to know just from a ballpark standpoint how many times we call out to the database from start to finish, and output that number to trace or a log or something.
Any ideas?