scitools.EfficiencyTable

This module contains a class for managing efficiency/performance experiments.

class scitools.EfficiencyTable.EfficiencyTable(description, normalization_time=None)[source]

Manage the CPU times of efficiency experiments and make tabular reports with sorted results.

>>> e = EfficiencyTable('some description of the experiments')
>>> e.add('about an experiment', cpu_time)
>>> e.add('about another experiment', cpu_time)
>>> e.add('about a third experiment', cpu_time)
>>> print e  # prints a sorted table with scaled CPU times
>>> e += e2  # add experiments from EfficiencyTable e2 to e

Methods

add(description, CPU_time[, function_name]) Add the CPU time of an experiment, together with a description
set_normalization_time(t) Set the CPU time by which all other CPU times will be divided.
add(description, CPU_time, function_name=None)[source]

Add the CPU time of an experiment, together with a description and an optional function_name (which is appended to the description string).

set_normalization_time(t)[source]

Set the CPU time by which all other CPU times will be divided. By default, this is the maximum CPU time encountered in the data.

scitools.EfficiencyTable.plot(filename)[source]

This Page