A Glimpse into PetaPoco
Last week I blogged about upcoming performance statistics that enable you to see all the Sql’s that were executed by PetaPoco in the current request.
It was also just over a week ago that I learned about Glimpse from this Mix video by Scott Hanselman. And wow what an impact. Anthony van der Hoorn (@anthony_vdh) and Nik Molnar (@nikmd23) had created a wonderful diagnostics system for Asp.net MVC. Firebug for the server if you will.
I then wondered if I could somehow plug PetaPoco diagnostics into the display for Glimpse and it was unbelievably easy. Implementing a single interface was all it took. Less than 50 lines of code in total to produce the following results. I will show you how to create your own tab in a future post. Update: Creating Your Own Glimpse Plugin
This gives a pretty clear display of exactly what queries were performed during the current request.
Another powerful feature of Glimpse is that it saves the last n (default 5) requests so it is indeed possible to get access to the Sql’s performed when posting data back to the server.
It really is a credit to the guys for a wonderful project which still hasn’t reached a V1.
My aim is to have both the integration to Glimpse and html source statistics available within the week but it all depends on whether the integration points make it into the main branch before hand.
Update (01/06/2011): This is now available as a package from NuGet called PetaPoco.Glimpse.
Until then, check out Glimpse (on NuGet as well) and support it by providing valuable feedback to the team.
Adam
[...] A Glimpse into PetaPoco [...]