Search code examples
autofacglimpse

Glimpse plugin for Autofac


I have recently built my own plugin for Glimpse to see all my Couchbase traffic, and would love to see statistics on what is going on in Autofac. Is there any work being done on an Autofac plugin for Glimpse? All I can find is the one from three years ago, but I don't think it shows a whole lot of detail.

Ideally what I would be looking for would be a full plugin that can do timings also, to measure the performance of Autofac using Glimpse and work out how much time is taken to resolve instances to isolate potential performance bottlenecks.

Has anyone done something like this? If not, does Autofac have hooks we could hook into to capture that stuff and log it?


Solution

  • I'm not aware of anyone who is currently creating a Glimpse extension for Autofac.

    As you mentioned, there is an extension out there now, but it might not be as detailed as you'd like.

    All that said, it seems like Autofac's Activation Events would make it pretty simple to create a new Glimpse extension to expose some of the data that you're after.

    For timings, if you are using an IServiceLocator in MVC, you could also create a GlimpseServiceLocator which uses a Stopwatch to get timing information.