开发者

Any way to use MvcMiniProfiler on windows application? Or is there a sister application?

开发者 https://www.devze.com 2023-03-22 21:37 出处:网络
So I\'ve started using MvcMiniProfiler on our websites and quite like it.We have a Windows Application component/framework that is leveraged by the website and I was wondering if it was possible to us

So I've started using MvcMiniProfiler on our websites and quite like it. We have a Windows Application component/framework that is leveraged by the website and I was wondering if it was possible to use the profiler on that. I'm assuming not, but maybe there is a subcomponent of the code that could be used? I see that there is a way to configure where the results are stored开发者_如何学运维 (i.e. Sql Server) so maybe it is close to possible?

We have the following flow:

Website submits job to 'broker' then returns a 'come back later' page.

Broker runs and eventually data in the websites database gets updated by the broker.

Website displays the results.

I'd be great if there was a way I could get the entire workflow profiled. If there is no way/no intentions from the developers to make MvcMiniProfiler available to Windows applications, any recommendations for similar styled profilers?


You could get this working by using SqlServerStorage, there is very little in the code base that heavily depends on ASP.NET, in fact the SQL interceptor is generalized and so it the stack used to capture the traces.

I imagine that a few changes internally need to be made, eg: use Thread.SetData as opposed to HttpContext but they are pretty superficial.

The way you would get this going is by passing the "profiling identity" into the App and then continuing tracking there. Eventually when the user hits the site after it happens, it would show up as little "chiclets" on the left side.

A patch is totally welcome here but it is not something it does in its current version.

(note to future readers, this is probably going to be out of date at some point, if it is please suggest an edit)


Yes, there's a Windows porting of MiniProfiler: http://nootn.github.io/MiniProfiler.Windows/

0

精彩评论

暂无评论...
验证码 换一张
取 消