Table of Contents

Class: case benchmark.py

A class whose instances are single benchmark cases

Methods   
__init__
__str__
check_dual
copy_include_files_to_host
debug
do_experiment
exc_info_to_string
generate_compile_command
generate_execute_command
generate_branch_misprediction_ratio_driver
generate_function_call_count_driver
generate_execution_mem_driver
generate_cpu_time_driver
make_subdirs
output
run
tidy_up
translate_filenames
  __init__ 
__init__ ( self )

initializes datastructures. sets randomized id (aproximation of unique id). sets default values for options.

  __str__ 
__str__ ( self )

returns the objects class signature

  check_dual 
check_dual ( self )

This function checks whether the functor has a member function named dual or not. This check is done locally regardless of the computer selected to run the benchmark. If this check fails and you are sure you have a dual function it is most likely because your functor cannot compile correctly.

  copy_include_files_to_host 
copy_include_files_to_host (
        self,
        results,
        copied_files=[],
        )

This function copies files needed to compile the benchmark on a remote computer to that computer through a gateway computer if specified.

  debug 
debug ( self )

runs do_experiment but ignores the result

  do_experiment 
do_experiment (
        self,
        cpp_filename,
        results,
        )

This function compiles the benchmark and executes it. It returns the result and errors if any occured. If the benchmark is to be run remotely the function copies the driver to the remote host before compiling it.

  exc_info_to_string 
exc_info_to_string ( self,  error )

returns a string containing a traceback

  generate_compile_command 
generate_compile_command (
        self,
        source,
        executable,
        )

This function generates the compile command for the banchmark. In doing so the function tells the compiler to look for files in the paths of include_paths and the remote_include_paths lists by use of the -I switch.

  generate_execute_command 
generate_execute_command ( self,  executable )

This function generates the command used to execute the benchmark. If applicable this command include connections to a remote host and a gateway machine.

  generate_branch_misprediction_ratio_driver 
generate_branch_misprediction_ratio_driver ( self )

This function generates a C++ driver for a functor. The functor must have a constructor and a member function primal. The output is the branch missprediction ratio.

  generate_function_call_count_driver 
generate_function_call_count_driver ( self )

This function generates a C++ driver for a functor. The functor must have a constructor and a member function primal. The function specified in self.counted_function is profiled. This function adds the g++ 3.2.2 switches needed to profile the program, if you use a compiler that needs other switches you have to overwrite self.compiler_options "after" this function is called.

  generate_execution_mem_driver 
generate_execution_mem_driver ( self )

This function generates a C++ driver for a functor. The functor must have a constructor and a member function primal. The output is the page faults and cache misses. If self.papitype is single: a single run is measured, if it is quad: four runs are measured and averaged and if warmedup is specified: only the second of two runs are measured.

  generate_cpu_time_driver 
generate_cpu_time_driver ( self )

This function generates a C++ driver for a functor. The functor must have a constructor and a member function primal, and possibly also a member function dual. The output is the time used by the primal minus that of the dual.

  make_subdirs 
make_subdirs ( self,  file )

This function makes the subdirectories on a remote computer needed for the copy_include_files_to_host function.

  output 
output ( self )

This function defines the result of a benchmark run, normally this is simply the output of the driver program. This can be overridden by a class inheriting case for more advanced benchmarks.

  run 
run ( self,  results )

This function runs the benchmark and returns the result and any errors encountered.

  tidy_up 
tidy_up ( self )

This function cleans up after the benchmark run.

  translate_filenames 
translate_filenames ( self )

This function translates the paths of the files in the include_files list to match the remote benchmark directory.


Table of Contents

This document was automatically generated on Fri Apr 4 16:51:01 2003 by Christian Søttrupusing HappyDoc version 2.1