|
The file common.py is the python module for performing benchmark log file processing.
|
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 processthe log after each test run. The data produced is used to check for Benchmark regressions (by checking against a reference threshold value) andto provide data for plotting the of multiple test runs.
|
It is used by parser.py programs in each Benchmark test directory, to processthe log after each test run. The data produced is used to check for Benchmark regressions (by checking against a reference threshold value) andto provide data for plotting the of multiple test runs.
|
|
Main functions: * parse() * process_data() * CUR_LOG
|
Main functions: * parse() * process_data() * CUR_LOG
|
|
|
= sys.argv =The common.py module uses the arguments passed to parser.py on it's commandline. The position arguments used are: * $1 - JOB_NAME * $2 - PLATFORM * $3 - BUILD_ID * $4 - BUILD_NUMBER * $5 - FIRMWARE * $6 - SDK * $7 - DEVICE
|
|
(see parser.py for invocation details)
|
(see [[parser.py]] for invocation details)
|
|
|
== parse() == * input: * cur_search_pattern - compiled re search pattern * output: * list of regular expression matches for each line matching the specified pattern
|
|
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 theexpression.
|
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 theexpression.
|
|
This list is used to populate a dictionary of metric/value pairs that canbe passed to the process_data function.
|
This list is used to populate a dictionary of metric/value pairs that canbe passed to the process_data function.
|
|
|
== process_data ==This is the main routine of the module. It processes the list of metrics,and populates various output files for test.
|
- input: * ref_section_pat - regular expression used to read reference.log * cur_dict - dictionary of metric/value pairs * m - indicates the size of the plot. It should be one of: 's', 'm', 'l', 'xl' * if 'm', 'l', or 'xl' are used, then a multiplot is created * label - label for the plot
|
* input: * ref_section_pat - regular expression used to read reference.log * cur_dict - dictionary of metric/value pairs * m - indicates the size of the plot. It should be one of: 's', 'm', 'l', 'xl' * if 'm', 'l', or 'xl' are used, then a multiplot is created * label - label for the plot
|
|
This routine has the following outline: * write_report_results * read the reference thresholds * check the values against the reference thresholds * store the plot data to a file (plot.data) * create the plot * save the plot to an image file (plot.png)
|
This routine has the following outline: * write_report_results * read the reference thresholds * check the values against the reference thresholds * store the plot data to a file (plot.data) * create the plot * save the plot to an image file (plot.png)
|
|
|
== CUR_LOG ==This has the name of the current log file, which can be opened and readdirectly by parser.py. Use of this is not needed if the parse() function isused.
|