
                               					20-May-1983 10:18:42	VAX-11 FORTRAN V3.2-37              Page   1
								10-May-1983 10:18:15	[GARY.STATS.SOURCE]STATRESP.FOR;27          

0001    !
0002    !			  COPYRIGHT (c) 1982 BY
0003    !	      MOSTEK CORPORATION, CARROLLTON TX
0004    !
0005    ! This software is furnished under a license and may be used and  copied
0006    ! only  in  accordance  with  the  terms  of  such  license and with the
0007    ! inclusion of the above copyright notice.  This software or  any  other
0008    ! copies  thereof may not be provided or otherwise made available to any
0009    ! other person.  No title to and ownership of  the  software  is  hereby
0010    ! transferred.
0011    !
0012    ! The information in this software is subject to change  without  notice
0013    ! and  should  not  be  construed  as  a commitment by MOSTEK
0014    ! CORPORATION.
0015    !
0016    ! MOSTEK assumes no responsibility for the use or  reliability  of  its
0017    ! software on equipment which is not supplied by MOSTEK.
0018    !
0019     
0020    !++
0021    ! FACILITY:
0022    !   MOSTEK CORPORATION
0023    !
0024    ! ABSTRACT:
0025    !     STATRESP calculates a  a "response value" for the running system.
0026    !
0027    ! ENVIRONMENT:
0028    !     VAX 11 VMS
0029    !
0030    ! AUTHOR: Gary Smith, CREATION DATE: 7/15/1982
0031    !
0032    ! MODIFIED BY:
0033    !
0034    !--
0035    !
0036    ! TABLE OF CONTENTS:
0037    !
0038    !
0039    ! INCLUDE FILES:
0040    !     mousesubs.for
0041    !     defrec.for
0042    !
0043    ! MACROS:
0044    !     none
0045    !
0046    ! EQUATED SYMBOLS:
0047    !     see mousesubs.for
0048    !
0049    ! EXTERNAL REFERENCES:
0050    !     LIB$INIT_TIMER, LIB$STAT_TIMER, LIB$EDIV
0051     
0052    !++
0053    ! FUNCTIONAL DESCRIPTION:
0054    !     When MOUSE wakes up to do it's gathering, it calls STATRESP immediately.
0055    !     STATRESP is initializes several variables for the cpu time and the 
0056    !     elapsed time. After MOUSE is thru gathering and collecting its data,
0057    !     STATRESP is again called to figure out the elapsed time it took

                               					20-May-1983 10:18:42	VAX-11 FORTRAN V3.2-37              Page   2
								10-May-1983 10:18:15	[GARY.STATS.SOURCE]STATRESP.FOR;27          

0058    !     to gather the stats and the cpu time it really used. The quotient
0059    !     of these two values is the "response".
0060    !
0061    ! FORMAL PARAMETERS:
0062    !     code; whether to initialize or calculate. 
0063    !
0064    !
0065    ! IMPLICIT INPUTS:
0066    !     none
0067    !
0068    !
0069    ! IMPLICIT OUTPUTS:
0070    !     response
0071    !
0072    !
0073    ! ROUTINE VALUE and
0074    ! COMPLETION CODES:
0075    !
0076    !
0077    !
0078    ! SIDE EFFECTS:
0079    !     none to date
0080    !
0081    !
0082    !--
0083          SUBROUTINE STATRESP ( code )
0084     
0085          include 'mousesubs.for'
0288          include 'defrec.for'
0390     
0391          integer code, status, quad_time(2), time
0392          integer LIB$INIT_TIMER, LIB$STAT_TIMER, LIB$EDIV
0393     
0394          external LIB$INIT_TIMER, LIB$STAT_TIMER, LIB$EDIV
0395     
0396          goto ( 100, 200 ) code
0397    !++
0398    ! do initialization
0399    !--
0400     
0401    100   status = LIB$INIT_TIMER()
0402          return
0403     
0404    !++
0405    ! compute response
0406    !--
0407     
0408    200   status = LIB$STAT_TIMER( 1, quad_time, )
0409          status = LIB$STAT_TIMER( 2, i_cpu_time )
0410          real_cpu_time = i_cpu_time
0411          status = LIB$EDIV( 100 000, quad_time, time, left_over )
0412          rec_response = ( time / real_cpu_time ) * 100
0413          return
0414          end   

STATRESP                       					20-May-1983 10:18:42	VAX-11 FORTRAN V3.2-37              Page   3
								10-May-1983 10:18:15	[GARY.STATS.SOURCE]STATRESP.FOR;27          

PROGRAM SECTIONS

    Name				 Bytes   Attributes

  0 $CODE                                   91   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG
  1 $PDATA                                  12   PIC CON REL LCL   SHR NOEXE   RD NOWRT LONG
  2 $LOCAL                                  84   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG
  3 REC_COMMON                             348   PIC OVR REL GBL   SHR NOEXE   RD   WRT LONG

    Total Space Allocated                  535


ENTRY POINTS

    Address  Type  Name                                        References

  0-00000000       STATRESP                                       83     


VARIABLES

    Address  Type  Name                            Attributes  References

 AP-00000004@ I*4  CODE                                           83       391       396     
  2-00000010  I*4  I_CPU_TIME                                    409A      410     
  2-00000018  I*4  LEFT_OVER                                     411A    
  2-00000014  R*4  REAL_CPU_TIME                                 410=      412     
  3-00000108  I*4  REC_RESPONSE                    COMM EQUIV    291       348       412=    

  2-00000008  I*4  STATUS                                        391       401=      408=      409=      411=    
  2-0000000C  I*4  TIME                                          391       411A      412     


ARRAYS

    Address  Type  Name                            Attributes        Bytes  Dimensions       References

  2-00000000  I*4  QUAD_TIME                                            8  (2)                 391       408A      411A    
  3-00000000  I*4  REC_CPU_MODES                   COMM EQUIV          36  (9)                 293       305     
  3-00000024  I*4  REC_FCP                         COMM EQUIV          20  (5)                 299       312     
  3-00000120  I*4  REC_LOCK_MODES                  COMM EQUIV          28  (7)                 301       367     
  3-00000080  I*4  REC_MEM_MODES                   COMM EQUIV           8  (2)                 294       317     

  3-00000038  I*4  REC_MISC                        COMM EQUIV          72  (18)                296       314     
  3-0000010C  I*4  REC_NET_MODES                   COMM EQUIV          20  (5)                 300       357     
  3-00000088  I*4  REC_PGFLT                       COMM EQUIV          28  (7)                 298       321     
  3-0000013C  I*4  REC_POOL_MODES                  COMM EQUIV          32  (8)                 302       378     
  3-000000A4  I*4  REC_SCH_STATE                   COMM EQUIV          56  (14)                297       326     

  3-000000DC  I*4  REC_SWAP                        COMM EQUIV          36  (9)                 295       332     
  3-00000100  I*4  REC_TIME                        COMM EQUIV           8  (2)                 292       339     
  3-00000000  I*4  STATS_REC                       COMM EQUIV         348  (87)                289       303       305     
											       312       314       317     
											       321       326       332     
											       339       348       357     
											       367       378     

STATRESP                       					20-May-1983 10:18:42	VAX-11 FORTRAN V3.2-37              Page   4
								10-May-1983 10:18:15	[GARY.STATS.SOURCE]STATRESP.FOR;27          

PARAMETER CONSTANTS

  Type  Name                                                   References

   I*2  ARRLOCPK                                                 232#    
   I*2  ARRTRAPK                                                 233#    
   CHAR ASCII_DELTA_TIME                                          90        91#    
   I*2  BIGHOLE                                                  266#    
   I*2  BJOBCNT                                                  122#    

   I*2  BUFIO                                                    143#    
   I*2  CEF                                                      189#    
   I*2  COLPG                                                    187#    
   I*2  COM                                                      198#    
   I*2  COMO                                                     199#    

   I*2  COMPAT                                                   120#    
   I*2  CPU_SIZE                                                 125#      282       293       312       314       317     
							         321       326       332       339       348       357     
							         367       378     
   I*2  CUR                                                      200#    
   I*2  DEPLOCPK                                                 234#    
   I*2  DEQ                                                      248#    

   I*2  DIRHIT                                                   152#    
   I*2  DIRIO                                                    142#    
   I*2  DIRMISS                                                  153#    
   I*2  DLCKFND                                                  249#    
   I*2  DLCKSRCH                                                 250#    

   I*2  DZROFLTS                                                 174#    
   I*2  ENQCVT                                                   251#    
   I*2  ENQNEW                                                   246#    
   I*2  ENQNOTQD                                                 252#    
   I*2  ENQWAIT                                                  247#    

   I*2  EXEC                                                     117#    
   I*2  EXTHIT                                                   154#    
   I*2  EXTMISS                                                  155#    
   I*2  FAULTS                                                   175#    
   I*2  FCP_CACHE                                                132#    

   I*2  FCP_CALLS                                                131#    
   I*2  FCP_CPU                                                  133#    
   I*2  FCP_READ                                                 134#    
   I*2  FCP_SIZE                                                 137#      282       299       314       317       321     
							         326       332       339       348       357       367     
							         378     
   I*2  FCP_WRITE                                                135#    

   I*2  FIDHIT                                                   156#    
   I*2  FIDMISS                                                  157#    
   I*2  FPG                                                      197#    
   I*2  FREECNT                                                  166#    
   I*2  GETDVI_EF                                                105#    

   I*2  HIB                                                      193#    

STATRESP                       					20-May-1983 10:18:42	VAX-11 FORTRAN V3.2-37              Page   5
								10-May-1983 10:18:15	[GARY.STATS.SOURCE]STATRESP.FOR;27          

   I*2  HIBO                                                     194#    
   I*2  HISWPCNT                                                 212#    
   I*2  HIT                                                      149#    
   I*2  HOLECNT                                                  265#    

   I*2  HOLESUM                                                  269#    
   I*2  HOSWPCNT                                                 211#    
   I*2  IDLE                                                     121#    
   I*2  IJOBCNT                                                  123#    
   I*2  INT                                                      119#    

   I*2  IRPCNT                                                   264#    
   I*2  ISPAGCNT                                                 207#    
   I*2  ISWPCNT                                                  208#    
   I*2  KERNEL                                                   115#    
   I*2  KEY_SIZE                                                 111#    

   I*2  LEF                                                      191#    
   I*2  LEFO                                                     192#    
   I*2  LOCK_SIZE                                                257#      282       301       378     
   I*2  LOGNAM                                                   144#    
   I*2  LRPCNT                                                   270#    

   I*2  MBREADS                                                  145#    
   I*2  MBWRITES                                                 146#    
   I*2  MEM_SIZE                                                 169#      282       294       321       326       332     
							         339       348       357       367       378     
   I*2  MFYCNT                                                   167#    
   I*2  MISC_SIZE                                                161#      282       296       317       321       326     
							         332       339       348       357       367       378     

   I*2  MWAIT                                                    188#    
   I*2  NET_SIZE                                                 241#      282       300       367       378     
   I*2  NUM_MODES                                                126#    
   I*2  OPEN                                                     151#    
   I*2  OPENS                                                    150#    

   I*2  OSWPCNT                                                  210#    
   I*2  PFW                                                      190#    
   I*2  PGFLT_SIZE                                               182#      282       298       326       332       339     
							         348       357       367       378     
   I*2  POOL_SIZE                                                277#      282       302     
   I*2  PREADIO                                                  176#    

   I*2  PREADS                                                   178#    
   I*2  PROCCNT                                                  209#    
   I*2  PWRITES                                                  179#    
   I*2  PWRITIO                                                  177#    
   I*2  QUOHIT                                                   158#    

   I*2  QUOMISS                                                  159#    
   I*2  RCVBUFFL                                                 235#    
   I*2  RDFLTS                                                   180#    
   I*2  REC_SIZE                                                 282#      303     
   I*2  RES                                                      227#    

   I*2  RESPONSE_SIZE                                            226#      282       357       367       378     

STATRESP                       					20-May-1983 10:18:42	VAX-11 FORTRAN V3.2-37              Page   6
								10-May-1983 10:18:15	[GARY.STATS.SOURCE]STATRESP.FOR;27          

   I*2  SCH_SIZE                                                 202#      282       297       332       339       348     
							         357       367       378     
   I*2  SMALLCNT                                                 268#    
   I*2  SMALLHOLE                                                267#    
   I*2  SPLIT                                                    148#    

   I*2  SRPCNT                                                   271#    
   CHAR STANDARD_NEST_FILE                                        97        98#    
   I*2  SUPER                                                    116#    
   I*2  SUSP                                                     195#    
   I*2  SUSPO                                                    196#    

   I*2  SWAP_SIZE                                                214#      282       295       339       348       357     
							         367       378     
   I*2  SWAP_SPARES                                              215#    
   I*2  TIME_SIZE                                                220#      282       292       348       357       367     
							         378     
   I*2  TRCNGLOS                                                 236#    
   I*2  TURN                                                     147#    

   I*2  USER                                                     118#    
   I*2  WAIT_EF                                                  104#    


LABELS

    Address   Label                                            References

  0-00000012  100                                                396       401#    
  0-0000001E  200                                                396       408#    


FUNCTIONS AND SUBROUTINES REFERENCED

  Type  Name                                                   References

   I*4  LIB$EDIV                                                 392       394       411     
   I*4  LIB$INIT_TIMER                                           392       394       401     
   I*4  LIB$STAT_TIMER                                           392       394       408       409     


  +----------------------------------------------+
  |           KEY TO REFERENCE FLAGS             |
  |   =   - Value Modified                       |
  |   #   - Defining Reference                   |
  |   A   - Actual Argument, possibly modified   |
  |   D   - Data Initialization                  |
  |  (n)  - Number of occurrences on line        |
  +----------------------------------------------+


STATRESP                       					20-May-1983 10:18:42	VAX-11 FORTRAN V3.2-37              Page   7
								10-May-1983 10:18:15	[GARY.STATS.SOURCE]STATRESP.FOR;27          

COMMAND QUALIFIERS

  FORTRAN /DEBUG/OBJECT=OBJ:STATRESP/LIST=LIS:STATRESP/CONT=99/CROSS/NOOPT SRC:STATRESP

  /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW)
  /DEBUG=(SYMBOLS,TRACEBACK)
  /STANDARD=(NOSYNTAX,NOSOURCE_FORM)
  /SHOW=(NOPREPROCESSOR,NOINCLUDE,MAP)
  /F77  /NOG_FLOATING  /I4  /NOOPTIMIZE  /WARNINGS  /NOD_LINES  /CROSS_REFERENCE  /NOMACHINE_CODE  /CONTINUATIONS=99


COMPILATION STATISTICS

  Run Time:           2.13 seconds
  Elapsed Time:       6.55 seconds
  Page Faults:        447
  Dynamic Memory:     844 pages
