next up previous contents index
Next: Print routines Up: Timing Previous: Print job time consumption   Contents   Index


Measure time consumption of part of program

\fbox {CALL QTIMED(INUM)}

This subroutine measures the time between two subsequent calls to QTIMED. Time statistics can be kept for up to 9 different subroutine calls (INUM = 1 - 9). The time consumption summary is printed automatically during job termination. The summary includes the number of calls and the total time / call. The first CALL QTIMED sets the start time. The time consumption for QTIMED itself (0.25 msec on CERNVM) is not subtracted in the time summary. (The CERNLIB routines TIMED/TIMAD should not be used with QTIMED.)

Example:


    CALL QTIMED(1)
      CODE A
    CALL QTIMED(2)
      CODE B
    CALL QTIMED(3)
 
  Results:
QTIMED  Ncalls  total_time   time/call   %
   1      499      35          0.07     92.2
   2      500       1          0.002     2.6
   3      500       2          0.004     5.2
In this example, time 2 gives the time consumption of `CODE A', time 3 gives the time consumption of `CODE B', and time 1 gives the time consumption between CALL QTIMED(3) and CALL QTIMED(1).

Joel Closier
2000-02-07