在C#中分析的方法来知道多久没有考虑到运行 [英] Profiling a method in C# to know how long does it take to run

查看:99
本文介绍了在C#中分析的方法来知道多久没有考虑到运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要得到一个时序报告就知道它需要多长时间能够运行在一个类中的C#方法。
我觉得关于使用概述来做到这一点。



的输入是在一个类中的方法的名称,则输出为



<醇>
  • 用什么方法/类调用这个方法。

  • 的时间量运行的方法。



  • 什么工具/商用产品都可以,对Visual Studio 2010和单?


    解决方案

    另一个开放源代码分析器是slimtune 的http://代码.google.com / p / slimtune /



    另外,您可以使用COM和ICorProfilerCallback接口创建自己的探查,但我会做到这一点,如果你想一个非常定制探查聚会。


    I need to get a timing report to know how long does it take to run a C# method in a class. I think about using profiler to do that.

    The input is the name of a method in a class, the output is

    1. What method/class calls this method.
    2. The amount of time to run the method.

    What tools/commercial products are available for that for Visual Studio 2010 and Mono?

    解决方案

    Another opensource profiler is slimtune http://code.google.com/p/slimtune/

    Alternatively you can create your own profiler using COM and the ICorProfilerCallback interfaces, but I would do this if you wanted a very customized profiler gathering.

    这篇关于在C#中分析的方法来知道多久没有考虑到运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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