Winforms 配置文件/覆盖率查找方法被调用的次数 [英] Winforms profile/coverage find number of times a method has been called

查看:13
本文介绍了Winforms 配置文件/覆盖率查找方法被调用的次数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种感觉,这将非常简单.我不知道我是否只是在这里遗漏了一个技巧,或者搜索了错误的短语.

I have a feeling this is going to be really simple. I don't know if I'm just missing a trick here, or searching for the wrong phrases.

我正在寻找可以监视应用程序(最好让我开始和停止监视)并计算方法已被执行的次数的分析或代码覆盖率(真的不知道这属于哪个类别)叫.我的任务是优化一些旧代码,同时我发现一些方法被调用了两次甚至 3 次,而它们只需要被调用一次.

I'm looking for a profiling or code coverage (don't really know which category this falls in) that can monitor an application (preferably let me start and stop the monitoring) and count the number of times a method has been called. I've been tasked with optimising some old code and whilst doing so, I've found a few methods that are being called twice or even 3 times, where they only need to be called once.

我觉得可能还有更多这些..

I have a feeling there could be more of these..

附带说明:我实际上是 JetBrains .NET 工具的忠实粉丝.我目前正在使用 ReSharper、dotPeek 和 dotTrace(但找不到办法做到这一点).是否值得研究 dotCover?

推荐答案

Visual Studio2010 Premium 及更高版本内置了性能分析工具,可以完全满足您的要求.

Visual Studio 2010 Premium and above have performance profiling tools built in that can do exactly what you're asking.

这是一篇关于 VS2010 Premium/Ultimate 中可用性能工具的博客.

Here's a blog about the performance tools available in VS2010 Premium/Ultimate.

这篇关于Winforms 配置文件/覆盖率查找方法被调用的次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆