Parser module API

The file common.py is the python module for performing benchmark log file processing.

It is used by parser.py programs in each Benchmark test directory, to process the log after each test run. The data produced is used to check for Benchmark regressions (by checking against a reference threshold value) and to provide data for plotting the of multiple test runs.

Main functions:

sys.argv [edit section]

The common.py module uses the arguments passed to parser.py on it's command line. The position arguments used are:

(see parser.py for invocation details)

parse() [edit section]

This routine scans the current log file, using a regular expression. It returns an re match object for each line of the log file that matches the expression.

This list is used to populate a dictionary of metric/value pairs that can be passed to the process_data function.

process_data [edit section]

This is the main routine of the module. It processes the list of metrics, and populates various output files for test.

This routine has the following outline:

CUR_LOG [edit section]

This has the name of the current log file, which can be opened and read directly by parser.py. Use of this is not needed if the parse() function is used.