有什么方法可以在 Windows 应用程序上使用 MvcMiniProfiler 吗?或者有姐妹应用吗?
所以我开始在我们的网站上使用 MvcMiniProfiler 并且非常喜欢它。我们有一个由网站利用的 Windows 应用程序组件/框架,我想知道是否可以在其上使用分析器。我假设不是,但也许代码中有一个可以使用的子组件?我看到有一种方法可以配置结果的存储位置(即 Sql Server),所以也许它接近可能?
我们有以下流程:
网站将作业提交给“经纪人”,然后返回“稍后回来”页面。
代理运行,最终网站数据库中的数据由代理更新。
网站显示结果。
如果有一种方法可以让我了解整个工作流程,那就太好了。如果开发人员没有办法/无意让 MvcMiniProfiler 可用于 Windows 应用程序,是否有类似风格的分析器的建议?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过使用 SqlServerStorage 来实现此功能,代码库中很少有严重依赖于 ASP.NET 的内容,事实上 SQL 拦截器是通用化的,因此它是用于捕获跟踪的堆栈。
我认为需要在内部进行一些更改,例如:使用 Thread.SetData 而不是 HttpContext,但它们非常肤浅。
实现此目的的方法是将“分析身份”传递到应用程序中,然后继续在那里进行跟踪。最终,当用户在发生这种情况后点击该网站时,它会在左侧显示为小“巧克力粒”。
补丁在这里是完全受欢迎的,但这不是它在当前版本中所做的事情。
(请注意未来的读者,这可能会在某个时候过时,如果是,请建议编辑)
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 toHttpContext
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)
是的,MiniProfiler 有 Windows 移植: http://nootn.github.io/MiniProfiler.Windows/< /a>
Yes, there's a Windows porting of MiniProfiler: http://nootn.github.io/MiniProfiler.Windows/