测量方法执行时间的有效途径 [英] Effective way of measuring method execution time

查看:105
本文介绍了测量方法执行时间的有效途径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.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.

这篇关于测量方法执行时间的有效途径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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