PROCEDURE enter_benchmark_environment, entbe (
  subcommand_libraries, sl : list of file = ..
   ($system.performance_tools.ptf$command_library, ..
    $system.performance_tools.ptf$benchmark_command_library )
  status)

   VAR
     ignore_status: status
     local_status: status
     subcommand_library : file
     subcommand_libraries : list of file = $parameter_value(subcommand_libraries)
   VAREND

   PUSH command_list
   FOR EACH subcommand_library IN subcommand_libraries DO
     create_command_list_entry e=subcommand_library status=local_status
     IF NOT local_status.normal AND local_status.condition <> cle$duplicate_command_list_ent THEN
      EXIT_PROC WITH local_status
     IFEND
   FOREND

   subcommand_libraries = $join($fname($string($source)), subcommand_libraries)
   UTILITY name=enter_benchmark_environment p='EBE' l=subcommand_libraries

     command n=(backup_benchmark_catalog, bacbc)
     command n=(change_scheduling_attributes, chasa)
     command n=(change_statistic_collection, chasc)
     command n=(change_keypoint_collection, chakc)
     command n=(change_spi_data_collection, chasdc)
     command n=(define_benchmark_users, defbu)
     command n=(display_benchmark_environment, disbe)
     command n=(duplicate_user_catalogs, dupuc)
     command n=(execute_streamtest,exes)
     command n=(expand_benchmark_decks, expbd)
     command n=(move_empower_files, movef)
     command n=(prevent_job_activation, preja)
     command n=(quit) p=quit_benchmark_environment
     command n=(run_benchmark, runb)
     command n=(run_standard_batch, runsb)
     command n=(setup_batch_ibl)
     command n=(setup_fse_ibl)
     command n=(setup_cbl)
     command n=(setup_hotkey)
     command n=(setup_ibl)
     command n=(setup_ivxed)
     command n=(setup_ivxex)
     command n=(setup_ivxvi)
     command n=(setup_nsb)
     command n=(setup_nsb_scalar)
     command n=(setup_nsb_vector)
     command n=(setup_sbl)
     command n=(setup_scl)
     command n=(setup_sibl)
     command n=(start_performance_collection, stapc)
     command n=(stop_performance_collection, stopc)
     command n=(submit_benchmark_jobs, subj)
     tablend

     VAR

" These variables must be declared first"

       bev$main_collection_catalog      : (utility) file = $user
       bev$benchmark                    : (utility) name = unspecified_benchmark
     VAREND

     VAR
       bev$active_task_info             : (utility, read) record
              at_start                       : file
              at_stop                        : file
              recend = ($fname($unique), $fname($unique))
       bev$backup_tape_vsn              : (utility) string 1..6 = 'DATA'
       bev$benchmark_environment        : (utility) boolean = true
       bev$benchmark_job_classes        : (utility) list of name = ()
       bev$collection_started_at        : (utility) string = '--------'
       bev$collection_stopped_at        : (utility) string = '--------'
       bev$engineering_log              : (utility) file = ..
              $fname($string(bev$main_collection_catalog)//'.'//bev$benchmark//'.ENGINEERING_LOG')
       bev$files_to_display             : (utility) list of file = ..
                                            ($system.scu.bound_product ..
                                             $system.scu.command_library ..
                                             $system.scu.scu_editor_help ..
                                             $system.scu.scu_editor_teach ..
                                             $system.fortran.bound_product ..
                                             $system.fortran.flf$library ..
                                             $system.cobol.bound_product ..
                                             $system.cobol.cbf$4dd_library)
       bev$keypoint_collection          : (utility) record
              environment                    : key job, j, system, s, sample_system, ss, sample_job, sj, keyend
              monitor_mask                   : list of any of key all, keyend, integer 0..15, anyend
              job_mask                       : list of any of key all, keyend, integer 0..15, anyend
              wait                           : boolean
              multiprocessor                 : key single, all, keyend
              keypoint_count                 : any of integer 1..250000000, key (no_collection, nc) keyend, anyend
              keypoint_buffer_size           : integer 1..32
              data_string                    : string 0..32
              performance                    : list of key memory, heap, swapping, aging, swap_trace, age_trace, ..
                   disk, command, all, none, keyend
              recend
       bev$keypoint_collection_files    : (utility) record
              file_1                         : file
              file_2                         : file
              recend = ..
                 ($fname($string(bev$main_collection_catalog)//'.'//bev$benchmark//'.KEYPOINT_COLLECTION_FILE'),..
                  $fname($string(bev$main_collection_catalog)//'.'//bev$benchmark//'.KEYPOINT_COLLECTION_FILE_2'))
       bev$performance_statistics_log   : (utility) file = ..
              $fname($string(bev$main_collection_catalog)//'.'//bev$benchmark//'.PERFORMANCE_STATISTICS')
       bev$performance_summary_file     : (utility) file = ..
              $fname($string(bev$main_collection_catalog)//'.'//bev$benchmark//'.PERFORMANCE_SUMMARY')
       bev$special_processing_commands  : (utility, read) record
              at_start                       : file
              at_stop                        : file
              recend = ($fname($unique), $fname($unique))
       bev$spi_data_collection_file     : (utility) file = ..
              $fname($string(bev$main_collection_catalog)//'.'//bev$benchmark//'.SPI_DATA_COLLECTION_FILE')
       bev$spi_data_collection          : (utility) record
              spi_identifier                 : integer 0..63
              number_of_spi_samples          : any of integer 100..100000000, key (no_collection, nc) keyend, anyend
              spi_sampling_interval          : integer 1..10000
              wait                           : boolean
              processors                     : list of key p0, p1, p2, p3, p4, p5, all, keyend
              data_string                    : string 0..32
              recend
       bev$statistic_collection         : (utility) record
              system_statistics              : list of statistic_code
              immediate_emission_set         : list 0..50 of statistic_code
              set_1_periodic_statistics      : list 0..50 of statistic_code
              set_1_emission_period          : any of integer, time_increment, anyend
              set_2_periodic_statistics      : list 0..50 of statistic_code
              set_2_emission_period          : any of integer, time_increment, anyend
              set_3_periodic_statistics      : list 0..50 of statistic_code
              set_3_emission_period          : any of integer, time_increment, anyend
              set_4_periodic_statistics      : list 0..50 of statistic_code
              set_4_emission_period          : any of integer, time_increment, anyend
              recend
       bev$subcommand_libraries         : (utility, read) list of file = $parameter_value(subcommand_libraries)

       bev$user_number_field_length     : (utility) integer = 3
     VAREND

     change_statistic_collection ..
          ss=( " user name               "  JM0 ..
               " job name                "  JM1 ..
               " job mode                "  JM2 ..
               " job end                 "  JM3 ..
               " task begin              "  PM0 ..
               " task starting procedure "  PM1 ..
               " task name               "  PM2 ..
               " taskend                 "  PM3 ..
               " loader begin            "  PM4 ..
               " loader end              "  PM5 ..
               " end accounting          "  AV7 ..
               " edit file begin         "  ES0 ..
               " edit file end           "  ES1 ..
               " edit deck begin         "  ES2 ..
               " edit deck end           "  ES3 ..
               " Cobol compilation       " CB0 ..
               " Fortran Compilation     " FC0 ..
               " Fortran program Unit    " FC1 ..
               " Fortran V2 compilation  " FV0 ..
               " Fortran V2 program unit " FV1 ) ..
         ies=( " job memory interval     "  OS0 ..
               " paging monitor interval "  OS1 ..
               " system io statistics    "  OS2 ..
               " io channel statistics   "  OS3 ..
               " io unit statistics      "  OS4 ..
               " disk unit space stat    "  OS5 ..
               " cpu usage statistic     "  OS6 ..
               " service class statistic "  OS7 ..
               " job class statistic     "  OS8 ..
               " system job data         "  OS9 ..
               " system task data        "  OS10 ..
               " memory utilization      "  OS11 ..
               " job count statistic     "  OS12 ..
               " page streaming stat     "  OS13 ..
               " key monitor request     "  OS14 ..
               " cpu dispatching stat    "  OS15 ..
               " page faults rejected    "  OS16 ..
               " system job data         "  OS9005 ..
               " swap state transitions  "  OS9007 ..
               " swapping page counts    "  OS9008 ..
               " aging data              "  OS9010 ..
               " monitor requests        "  OS9011 ..
               " job count data          "  OS9013 ..
               "namve layer and ME stats "  NA0 ..
               "namve intranet layer     "  NA1 ..
               "namve OSI ME and layer   "  NA2 ..
               "namve channel connect OSI"  NA3 ..
               "statistics interval begin"  OS9998 ..
               "statistics interval end  "  OS9999 ) ..
          s1ps=(OS0 OS1 OS2 OS3 OS4 OS5 OS6 OS7 OS8 OS9 OS10 OS11 OS12 OS13 OS14 ..
                OS15 OS16 OS9005 OS9007 OS9008 OS9010 OS9011 OS9013 ..
                NA0 NA1 NA2 NA3) ..
          s1ep=1 ..
          s2ps=() s2ep=1 s3ps=() s3ep=1 s4ps=() s4ep=1

     change_spi_data_collection si=0 noss=5000000 ssi=50 w=false p=all ..
          ds='spi data collection utility'

     change_keypoint_collection e=system mm=all jm=all w=true m=single ..
          kc=no_collection kbs=1 ds='keypoint collection utility' p=none

     put_line l=('" This file contains any special commands to be executed by start_performance_collection."') ..
          o=bev$special_processing_commands.at_start
     put_line l=('" This file contains any special commands to be executed by stop_performance_collection."') ..
          o=bev$special_processing_commands.at_stop

     IF $file($user.performance_tools.benchmark_prolog, permanent) THEN
       include_file f=$user.performance_tools.benchmark_prolog
     IFEND

     include_file f=$command_of_caller u=$utility(name)

     delete_file f=bev$special_processing_commands.at_start
     delete_file f=bev$special_processing_commands.at_stop
     delete_file f=bev$active_task_info.at_start status=ignore_status
     delete_file f=bev$active_task_info.at_stop status=ignore_status
   UTILITYEND

   POP command_list

PROCEND enter_benchmark_environment
