V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
thelordsaves
V2EX  ›  程序员

有哪些比较好的计算程序运行时间的工具?

  •  
  •   thelordsaves · 2013-04-14 20:39:18 +08:00 · 3518 次点击
    这是一个创建于 4029 天前的主题,其中的信息可能已经有所发展或是发生改变。
    有哪些比较好的计算程序运行时间的工具?比如相应的lib之类,有什么比较好的技巧和注意的地方?
    8 条回复    1970-01-01 08:00:00 +08:00
    ywencn
        1
    ywencn  
       2013-04-14 20:44:53 +08:00
    木有听懂。。。
    crazybubble
        2
    crazybubble  
       2013-04-15 03:49:05 +08:00
    你可以通过在main function里的头尾取当前时间,然后相减得到运行时间。或者可以去找找profiling tool,那种是专门用来评测程序运行性能的工具,不仅能告诉你程序跑了多少时间,还能够告诉你哪部分时间花的最久等等的信息。
    jetbillwin
        3
    jetbillwin  
       2013-04-15 07:07:55 +08:00
    time
    willwen
        4
    willwen  
       2013-04-15 19:48:07 +08:00
    $ time node test
    xinhugo
        5
    xinhugo  
       2013-04-15 22:58:00 +08:00
    ManicTime(小道君推荐的)
    judezhan
        6
    judezhan  
       2013-04-17 13:00:47 +08:00
    time
    pengdu
        7
    pengdu  
       2013-04-17 13:04:17 +08:00
    1, linux: time
    2, c++: gprof
    3, 自己在函数里面写桩,用#define来控制
    bgtwoigu
        8
    bgtwoigu  
       2013-04-18 11:52:53 +08:00
    intel vtune
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   984 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 21:01 · PVG 05:01 · LAX 14:01 · JFK 17:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.