I am trying to create a plugin based on the ServiceStack IPlugin interface, which can measure the elapsed time of operations and publish it on the information panel. The code itself would be quite simple, and I tried to do this based on some concepts in Request Logger .
This logger uses StopWatch , which is added inside the ServiceRunner class by default, but it only works when you configure the request logger.
I already have a custom ServiceRunner, and StopWatch is initialized here, but using this approach is not optimal, since the plugin is not standalone.
My biggest problem right now is that I apparently cannot access the IRequestContext. Is there a way a plugin can access this context, or in any other way to measure the time it takes to run requests inside a simple plugin that is not dependent on ServiceRunner?
Thanks!
c # servicestack
rocco
source share