简体   繁体   English

可以在我的应用程序中添加“离线分析”功能吗?

[英]Possible to add “offline profiling” functionality to my application?

Being a long time user of Red Gate's ANTS Performance Profiler , I'm currently searching for a way to do profiling on non-development machines. 作为Red Gate的ANTS Performance Profiler的长期用户,我目前正在寻找在非开发机器上进行性能分析的方法。

We have a rather large user base of a WinForms application, written in .NET 4. 我们有一个用.NET 4编写的WinForms应用程序的相当大的用户群。

Users every now and then complain about poor performance. 用户时不时抱怨性能不佳。

Since I cannot buy and install ANTS on every customer's PC, I'm thinking about something like: 由于我无法在每位客户的PC上购买和安装ANTS,因此我在考虑以下问题:

  1. Add some magic code to my application that uses the .NET Profiling API . 向使用.NET Profiling API的应用程序中添加一些魔术代码。
  2. Provide a switch in my application to enable profiling tracing. 在我的应用程序中提供一个开关以启用性能分析跟踪。
  3. Tell the user to activate the switch. 告诉用户激活开关。
  4. Let the API record performance "events" for some time. 让API记录一段时间的性能“事件”。
  5. Tell the customer to ship me the recorded logs. 告诉客户将记录的日志寄给我。
  6. Open the logs in some fancy GUI to analyse the hotspots. 在一些精美的GUI中打开日志以分析热点。

My question: 我的问题:

Is it somehow possible to use the .NET profiling API to include offline performance hotspot recording to analyse later on? 是否可以使用.NET分析API包含脱机性能热点记录以供以后分析?

Update 1: 更新1:

I've just found the " dotTrace Perfomance API " which introduces the term self-profiling which seems to be just what I'm looking form. 我刚刚找到了“ dotTrace Perfomance API ”,其中引入了术语“ 自我分析” ,这似乎正是我正在寻找的形式。

Checking the article now… 现在检查文章…

Yes, dotTrace API seems to be the best solution. 是的, dotTrace API似乎是最好的解决方案。 Actually, you can use the same approach as JetBrains uses for ReSharper. 实际上,您可以使用与JetBrains用于ReSharper的方法相同的方法。 There is the option in the ReSharper's Help menu - Profile Visual Studio . ReSharper的“帮助”菜单中有该选项-Profile Visual Studio What this menu does is run self-profiling. 该菜单的作用是运行自我分析。 When a user faces a slowdown, JB support asks him to use this menu and reproduce the issue. 当用户遇到运行缓慢时,JB支持人员要求他使用此菜单并重现问题。 The collected performance snapshot is then sent to JetBrains. 然后将收集的性能快照发送到JetBrains。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM