测量方法执行时间的有效途径执行时间、有效途径、测量方法

2023-09-06 18:08:17 作者:似你眼中星辰

我有一个.NET的视频处理应用程序,即,当给定一个大的流媒体图像序列(视频)有时不兑现输出实时帧速率。处理步骤包括执行多种方法对输入数据帧上。什么是有效的方法(可能是准备用库)在.NET来分析方法执行? (确切地知道哪些方法花了多少时间在看什么步骤,我们有一个果酱)

I have a .net video processing application, that, when given a large streaming image sequence (a video) is sometimes not delivering a real time frame rate on the output. The processing steps include executing several methods on an incoming frame. What is an effective way (maybe a ready to use library) in .net to profile method execution? (know exactly which method took how much time to see at what step we have a jams)

推荐答案

在理想情况下,使用一个分析器。尝试Equatec,蚂蚁或dotTrace。

Ideally, using a profiler. Try Equatec, ANTS or dotTrace.

如果你只是一些快速和肮脏的输出时,秒表类为您提供了高清晰度的计时统计数据。只是新一轮上涨,启动和停止,并检查所经过的属性。

If you just some quick and dirty output, the Stopwatch class gives you high-res timing stats. Just new one up, start and stop and check the Elapsed property.