Package esys :: Package escript :: Module benchmark :: Class Benchmark
[hide private]
[frames] | no frames]

Class Benchmark

object --+
         |
        Benchmark

Runs a bunch of similar BenchmarkProblems with a bunch of Options.

Instance Methods [hide private]
 
__init__(self, name=None, description=None)
Sets up a benchmark.
str
__str__(self)
Returns the name of the benchmark suite.
 
addOptions(self, options)
Adds options to the benchmark.
 
addProblem(self, problem)
Adds a problem to the benchmark.
str
getHTML(self, filter, level=1)
Returns the results of the last benchmark run in HTML format.
 
run(self, scale=1)
Runs all problems with all options.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, description=None)
(Constructor)

 

Sets up a benchmark.

Parameters:
  • name (str) - name of the benchmark. If no name is given the class name is used.
  • description (str or None) - description of the benchmark
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

Returns the name of the benchmark suite.

Returns: str
the name
Overrides: object.__str__

addOptions(self, options)

 

Adds options to the benchmark.

Parameters:
  • options (Options) - the options to be added to the benchmark. If options==None the options are left unchanged.

addProblem(self, problem)

 

Adds a problem to the benchmark.

Parameters:

getHTML(self, filter, level=1)

 

Returns the results of the last benchmark run in HTML format.

Parameters:
  • filter (BenchmarkFilter) - filter to be applied to the results
  • level (int) - level used in header <H?> tags
Returns: str
HTML document

run(self, scale=1)

 

Runs all problems with all options.

Parameters:
  • scale (int or list of ints) - defines the number of (OpenMP) threads to be used. If scale is a scalar all benchmarks are run with scale number of threads. If scale is a list, the p-th problem in each of the benchmarks in the suite is run with scale[p] threads. If scale[p]<1 the p-th problem is omitted.