0

I'm the maintainer of the Miniprofiler Glimpse plugin and with the latest Miniprofiler versions I'm not able to push data to Glimpse because the Profiler is not yet populated (in previous versions it was) when the GetData() method of the tab is called.

Right now what I do is wrap the Miniprofiler Storage and when the Save() method is called, all the needed information is there but it's too late and I don't know how to send it to the tab.

So, what is the best approach (if possible) to add this information to a tab when it's ready in Miniprofiler?

Marc Climent
  • 9,434
  • 2
  • 50
  • 55

1 Answers1

1

Unfortunately EndRequest is currently the last moment you can subscribe on to return the necessary data. That is the moment when Glimpse will finalize its monitoring for the given request and the moment it will persist that information to the persistence store.

Although in v1 it is possible to add data after the EndRequest but only when using the default in memory store. So you could return your wrapper, which will be empty at that moment, and it will be stored in memory, allowing you to change the wrapped content afterwards.

But the above will not work for other persistence stores. We might also change this in v2 to make it deterministic, independent of the persistence store being used.

Maybe you could have your wrapper ask MiniProfiler to calculate the results at that moment, so they can be stored, even though those results might not be 100% complete?

cgijbels
  • 5,994
  • 1
  • 17
  • 21