Class PerformanceReporter
source code
Reporter.Reporter --+
|
PerformanceReporter
PerformanceReporter - Convenience module for performance-related
reporters:
from inca.PerformanceReporter import PerformanceReporter, PerformanceBenchmark
performance = PerformanceReporter(
name = 'My performance reporter',
version = 1,
description = 'Measures host performance',
url = 'http://inca.sdsc.edu',
measurement_name = 'host performance'
)
...
benchmark = PerformanceBenchmark()
benchmark.addParameter('num_cpus', 16)
benchmark.addStatistic('bandwidth', 10, 'Mb/s')
performance.addBenchmark('sample', benchmark)
reporter.printReport()
Module for writing performance related reporters. A performance
reporter has one or more benchmarks. Each benchmark has one or more
statistics (i.e., results) and can further be described with one or more
parameters. For example:
<performance>
<ID>some_id</ID>
<benchmark>
<ID>sample</ID>
<parameters>
<ID>parameters</ID>
<parameter>
<ID>num_cpus</ID>
<value>16</value>
</parameter>
</parameters>
<statistics>
<ID>statistics</ID>
<statistic>
<ID>bandwidth</ID>
<value>10</value>
<units>Mb/s</units>
</statistic>
</statistics>
</benchmark>
</performance>
By default, the exit status of the reporter will be set to true (i.e.,
success).
|
|
__init__(self,
**attrs)
Class constructor that returns a new PerformanceReporter object. |
source code
|
|
|
|
|
|
|
addNewBenchmark(self,
name)
A convenience that combines the allocation of a benchmark and its
addition to the reporter. |
source code
|
|
|
|
getMeasurementName(self)
Returns the name of the performance metric measured by the reporter. |
source code
|
|
|
|
|
|
|
setMeasurementName(self,
name)
Sets the name of the performance metric measured by the reporter. |
source code
|
|
|
Inherited from Reporter.Reporter:
__del__,
addArg,
addDependency,
argValue,
argValues,
compiledProgramOutput,
compiledProgramStatusOutput,
failPrintAndExit,
getBody,
getCompleted,
getCwd,
getDescription,
getFailMessage,
getName,
getUrl,
getVersion,
log,
loggedCommandOutput,
loggedCommandStatusOutput,
printReport,
processArgv,
report,
setBody,
setCompleted,
setCwd,
setDescription,
setFailMessage,
setName,
setResult,
setUrl,
setVersion,
tempFile,
xmlElement
|
|
Class constructor that returns a new PerformanceReporter object. The
constructor supports the following parameter in addition to those
supported by Reporter:
measurement_name
the name of the performance metric measured by the reporter;
default ''.
- Overrides:
Reporter.Reporter.__init__
|
|
Add a benchmark to the reporter. benchmark is an object of type
PerformanceBenchmark. name identifies the benchmark.
|