I’m trying to write a web part that will log some performance metrics to the database when the user loads the page that the web part is placed on. Although I can write to the database with no problems I’m unsure how to capture any relevant performance information.
I’ve looked at ASP.NET trace but it doesn’t look like you can embed this in a web part – are there any other options available to me?
At minimum I hope to be able to capture the page load time so I can benchmark it over time and compare different users against each other.
edit: Although this will only capture part of the page load event I’d still like to know how to do this (degregation between sites, even over partial events will still give me the information I seek provided those samples are limited in all cases).
I currently use MiniProfiler of StackOverflow for my ASP.NET MVC site. I strongly recommend that.