ANTS Profiler 中的时间和点击数是多少

发布于 2024-12-20 07:12:06 字数 432 浏览 3 评论 0原文

我开始评估Red Gate 的 ANTS Profiler 来分析我的 WPF 应用程序。

我通读了在线支持/文档​​,似乎找不到基础知识的解释(我不知道为什么它们不在文档中):

在分析器中,它显示时间和方法的命中计数。为什么时间的单位是%?不应该是第二个吗?我尝试将所有百分比相加,但加起来不等于 100。与孩子在一起的时间 也有 % 单位,加起来超过 100%。我无法判断它们是时间还是某物的一部分。

什么是点击数?什么是“点击”我的应用程序以及哪些点击被计算在内?

我知道我听起来很弱智,但如果不了解时间和点击数,我就无法阅读论坛或在线帮助。

I start to evaluate Red Gate's ANTS Profiler to profile my WPF application.

I read through the online support/documentation and can't seem to find explanation for the basics (and I don't know why they are not in the documentation):

In the profiler, it shows Time and Hit Count of Method. Why is Time has unit of %? Shouldn't it be second? I try to add up all the percentage but they don't add up to 100. The Time with Children has also unit in %, which adds up more than 100%. I cannot tell whether they are time or portion of something.

What is Hit Count? What is "hitting" my application and what hit is being count?

I know I sound very retarded, but without understanding Time and Hit Count I can't being reading the forum or online help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

楠木可依 2024-12-27 07:12:06

来自 RedGate 文档

堆栈跟踪中显示了每个方法的以下数据,
对于选定的时间段:

时间:此堆栈跟踪中方法的总执行时间。

Time With Children:方法和所有内容的总执行时间
它的子级在此堆栈跟踪中。

点击次数:次数
该方法是在此堆栈跟踪中调用的。

From the RedGate documentation:

The following data is shown for each method within the stack trace,
for the selected time period:

Time: the total execution time for the method within this stack trace.

Time With Children: the total execution time for the method and all
its children within this stack trace.

Hit Count: the number of times
the method was called within this stack trace.

凉世弥音 2024-12-27 07:12:06

马修之前的回答是正确的。扩展一下:

当您以百分比形式查看时间时,每个方法的时间百分比表示该方法贡献的选定时间段内总执行时间的比例。

如果您希望查看以秒为单位的时间,请点击查看,然后选择刻度毫秒

如果您有多个 CPU,则总时间可能会超过 100%。

关于命中计数的问题有点令人费解——它确实应该显示在选定的时间段内调用该方法的次数。如果您确定看到的点击次数高于应有的数量,则可能值得联系 Red Gate 支持 - [电子邮件受保护]

我希望这有帮助!

Matthew's earlier answer is correct. To expand on it:

When you view time in percentages, the % time for each method represents the proportion of the total execution time for the selected period that the method contributed.

If you prefer to see time in seconds, click on View, then select Ticks, Milliseconds, or Seconds.

The total time can sum to more than 100% if you have more than one CPU.

The question about hit count is a bit more puzzling - it should indeed show how many times the method was called in the selected time period. If you're sure the hit count you're seeing is higher than it should be, it's probably worth contacting Red Gate support - [email protected] .

I hope this helps!

我很OK 2024-12-27 07:12:06

我没有完成所有计算,但我认为时间%是该方法一次“命中”的平均值。我的猜测是,当您将点击次数与时间百分比相乘并将它们相加时,您将得到 100%。

与《与孩子共处》的情况相同,但计算起来要复杂得多,因为您必须考虑更多方法。

I haven't done all the calculations, but I think the time % is the average of one "hit" to the method. My guess is when you multiply the hit count with the Time% and sum them up, you get the 100%.

It would be the same with Time With Children but a lot more complex to calculate because you have to take into account many more methods.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文