Effective way of measuring method execution time

余生颓废 提交于 2019-12-11 11:01:06

问题


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)


回答1:


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.



来源:https://stackoverflow.com/questions/9692001/effective-way-of-measuring-method-execution-time

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!