Description of BENCH

Download count: 7 this month, 5884 altogether.
Downloads for BENCH :
  VMARC archive: v-21K

From Kris Buelens, IBM Belgium

BENCH makes it easy to check how much CPU, I/O and paging a command costs. It also allows to easily compare the consumption of two alternative implementations of a command (e.g. PIPE <-> EXECIO )

A very short example:

Let's see how much ASSEMBLE of a small program costs:

                                                                           
bench assemble cmpa                                                      
                                                                                
ASSEMBLER (XF) DONE                                                             
NO STATEMENTS FLAGGED IN THIS ASSEMBLY                                          
results of: 1 time(s) assemble cmpa                                             
                                                                                
Virtual cpu time      :    0.45 Sec      = 00:00:00.45                          
Total cpu time        :    0.52 Sec      = 00:00:00.52                          
Start I/O             :   57                                                    
 IO time (.025 per IO):    1.43 Sec      = 00:00:01.43                          
Elapsed time          :    1.67 Sec      = 00:00:01.67                          
Service time (IO+CPU) :    1.95 Sec      = 00:00:01.95                          
Page reads            :    0                                                    
Page writes           :    0                                                    
Ready;                                                                          
We know for example that 57 IO's were required and that .52 seconds CPU were consumed. These data come from comparing the result of an IND USER and Q TIME before and after the command. The IO time is a wild guess, we suppose each IO costs 25 miliseconds.

Now let's see if it is true that HLASM is better than ASSEMBLE:

                                                                           
bench (run next) hlasm cmpa                                              
RDR FILE 7716 SENT FROM BUELENSC PUN WAS 7716 RECS 0149 CPY  001 A NOHOLD NOKEEP
results of:                                                                     
 1  1 X : assemble cmpa  (rc=0)                                                 
 2  1 X : hlasm cmpa  (rc=0)                                                    
                                                                                
 R  V.cpu  T.cpu  SIO    IO  Service  Elapsed Page Page | Comment/Command       
 U   time   time        time    time     time  rds wrts |                       
 N (Secs) (Secs)  nbr (Secs)  (Secs)   (Secs)           |                       
--------------------------------------------------------+---------------------- 
 1   0.45   0.52   57   1.43    1.95     1.67    0    0  assemble cmpa          
 2   0.36   0.40   40   1.00    1.40     1.24    0    5  hlasm cmpa             
Ready;                                                                          
We can indeed conclude that this is the case.

REXX coders can use BENCH to compare different incantations of an EXEC. Refer to BENCH HELPCMS for an example highlighting that address command performs better than the default of address CMS

BENCH 1.1 (28 Nov 1997)

Avoid a REXX syntax error when calling BENCH2 LAST without having BENCH2 INIT

BENCH 1.2 (17 Jun 1999, 2 Jun 2003)

CPU consumption is expressed with a higher precision: we use Diagnose 0C instead of CP Q TIME.