• 请不要在回答技术问题时复制粘贴 AI 生成的内容
thelordsaves
V2EX  ›  程序员

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

  •  
  •   thelordsaves · Apr 14, 2013 · 4434 views
    This topic created in 4804 days ago, the information mentioned may be changed or developed.
    有哪些比较好的计算程序运行时间的工具?比如相应的lib之类,有什么比较好的技巧和注意的地方?
    8 replies    1970-01-01 08:00:00 +08:00
    ywencn
        1
    ywencn  
       Apr 14, 2013
    木有听懂。。。
    crazybubble
        2
    crazybubble  
       Apr 15, 2013
    你可以通过在main function里的头尾取当前时间,然后相减得到运行时间。或者可以去找找profiling tool,那种是专门用来评测程序运行性能的工具,不仅能告诉你程序跑了多少时间,还能够告诉你哪部分时间花的最久等等的信息。
    jetbillwin
        3
    jetbillwin  
       Apr 15, 2013
    time
    willwen
        4
    willwen  
       Apr 15, 2013
    $ time node test
    xinhugo
        5
    xinhugo  
       Apr 15, 2013
    ManicTime(小道君推荐的)
    judezhan
        6
    judezhan  
       Apr 17, 2013
    time
    pengdu
        7
    pengdu  
       Apr 17, 2013
    1, linux: time
    2, c++: gprof
    3, 自己在函数里面写桩,用#define来控制
    bgtwoigu
        8
    bgtwoigu  
       Apr 18, 2013
    intel vtune
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3205 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 11:26 · PVG 19:26 · LAX 04:26 · JFK 07:26
    ♥ Do have faith in what you're doing.