Re: timing a program on Windows

From: Herman D. Knoble (SkipKnobleLESS_at_SPAMpsu.edu)
Date: 02/22/04

  • Next message: Ken Plotkin: "Re: Fortran advocacy (was Re: A petition to J3 apropos FORTRAN's future)"
    Date: Sun, 22 Feb 2004 15:07:27 -0500
    
    

    B:

    There is a utility named TimeThis.exe that will run under Windows
    NT/2000/XP and I presume 2000 Server and 2003 Server. It works
    for most any .EXE including Fortran .EXE's. Download it at:

    http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/timethis-o.asp

    As you mention, you can get wall clock time via a .BAT file like:
    echo off
    rem Set the prompt to the time of day.
    prompt $t$g
    if exist %1.BAT GOTO CALLIT
    echo on
    %1 %2 %3 %4 %5 %6 %7 %8 %9
    echo off
    GOTO WRAPUP
    :CALLIT
    echo on
    CALL %1 %2 %3 %4 %5 %6 %7 %8 %9
    echo off
    :WRAPUP
    rem Restore the usual prompt.
    prompt $p$g

    Skip Knoble, Penn State

    On 21 Feb 2004 17:21:35 -0800, beliavsky@aol.com wrote:

    -|I have wondered how to time an executable from the command line on
    -|Windows -- there is no built-in command. Recently I provided a batch
    -|file hack to do this, but it's a hack. The Windows Server 2003
    -|Resource Kit, which can be downloaded free from the Microsoft web site
    -|(the file is rktools.exe), is also supported on XP. There are two
    -|commands for timing programs, ntimer.exe and timeit.exe. They both
    -|agree closely with the results I get from using the Fortran 95
    -|intrinsic SYSTEM_CLOCK.
    -|
    -|For example, typing 'ntimer -1 foo.exe' at the command line, where
    -|foo.exe is a Fortran executable that prints the time taken at the end,
    -|gave me the output
    -|
    -| time elapsed (s) = 103.2040
    -| 0:01:43.234 0:01:42.093 0:00:00.812 0:00:00.000
    -|
    -|The four times shown by ntimer are the elapsed, kernel, user, and idle
    -|time. The measured elapsed times, 103.204 and 103.234 seconds, agree
    -|closely, and the latter includes the time taken by the final print
    -|statement.
    -|
    -|An operating system designed for programmers would have ntimer.exe
    -|built-in, rather than something you need to download.

       Herman D. (Skip) Knoble, Research Associate
       (a computing professional for 38 years)
       Email: SkipKnobleLESS@SPAMpsu.edu
       Web: http://www.personal.psu.edu/hdk
       Penn State Information Technology Services
        Academic Services and Emerging Technologies
         Graduate Education and Research Services
       Penn State University
         214C Computer Building
         University Park, PA 16802-21013
       Phone:+1 814 865-0818 Fax:+1 814 863-7049


  • Next message: Ken Plotkin: "Re: Fortran advocacy (was Re: A petition to J3 apropos FORTRAN's future)"

    Relevant Pages

    • Re: ftp problem
      ... takes me straight into the web server. ... Can I clear what Windows has remembered so I get the ... Have you tried logging in from a command prompt? ... May at least prove if the username/password are ok and you can connect, ...
      (uk.people.silversurfers)
    • Re: Windows File Protection
      ... you are very helpful and I appreciate your prompt responses. ... Then when the server suggests i have the wrong CD, ... Exchange and Windows Server but may not be up-to-date with the ... Warning Network interface driver file is more than one year old: ...
      (microsoft.public.windows.server.sbs)
    • Re: Webpage asking for credentials
      ... IE will not be challenged with a username and password prompt if: ... Authentication-IWA) for the virtual directory of the web site and ... the user logged in to their Windows computer with the same Windows ... the connection between the user's computer and the IIS server is not ...
      (microsoft.public.windows.server.general)
    • Re: Sorry its not a window 2003 server .. its NT 4.0 sever!!!
      ... You should use Windows Explorer and Windows FileMananger for ... >found" obviously coz i am not connected to the server. ... >> For mapping a network share from the command line you have to use the "net ... >> echo. ...
      (microsoft.public.windows.server.scripting)
    • Re: profile g95
      ... Windows 2000 Resource Kit routine, ... elapsed time for a command. ... echo off ... rem Set the prompt to the time of day. ...
      (comp.lang.fortran)