|
| 1 | +# Reports |
| 2 | + |
| 3 | +Produces a report in github markdown, and optionally pdf format that includes a summary table and the relevant |
| 4 | +plots from the CBT run. |
| 5 | + |
| 6 | +## Output |
| 7 | +A report in github markdown format with a plots directory containing the required plots. The report and plots directory |
| 8 | +can be uploaded directly to github as-is and the links will be maintained. |
| 9 | + |
| 10 | +Optionally a report in pdf format can also be created. |
| 11 | + |
| 12 | +Due to the tools used there are only 6 unique colours available for the plot lines, so it is recommended to limit the |
| 13 | +comparison to 6 or less files or directories. During testing we found that more than four directories can start rendering |
| 14 | +the pdf report unreadable, so it is not recommended to create a pdf report to compare data from more than four |
| 15 | +benchmark runs. |
| 16 | + |
| 17 | +## Standalone scripts |
| 18 | +There are actually 2 scripts provided as wrappers for the report generation: |
| 19 | +* generate_performance_report.py |
| 20 | +* generate_comparison_performance_report.py |
| 21 | + |
| 22 | +### generate_performance_report |
| 23 | +Creates a performance report for a single benchmark run. The results must first have had the formatter run on them. |
| 24 | + |
| 25 | +``` |
| 26 | +generate_performance_report.py --archive=<full_path_to_results_directory> |
| 27 | + --output_directory=<full_path_to_directory_to_store_report> |
| 28 | + --create_pdf |
| 29 | +``` |
| 30 | + |
| 31 | +where: |
| 32 | +- `--archive` Required. The archive directory containing the files from the formatter |
| 33 | +- `--output_directory` Required. The directory to store the markdown report file and relevant plots. |
| 34 | +- `--create_pdf` Optional. Create a pdf report |
| 35 | + |
| 36 | +Full help text is provided by using `--help` with the scripts |
| 37 | + |
| 38 | +#### Example |
| 39 | +```bash |
| 40 | +PYTHONPATH=/cbt /cbt/tools/generate_performance_report.py --archive="/tmp/ch_cbt_main_run" --output_directory="/tmp/reports/main" --create_pdf |
| 41 | +``` |
| 42 | + |
| 43 | +### generate_comparison_performance_report.py |
| 44 | +Creates a report comparing 2 or more benchmark runs. The report will only include plots and results for formatted files |
| 45 | +that are common in all the directories. |
| 46 | + |
| 47 | +``` |
| 48 | +generate_comparison_performance_report.py --baseline=<full_path_to_archive_directory_to_use_as_baseline> |
| 49 | + --archives=<full_path_to_results_directories_to_compare> |
| 50 | + --output_directory=<full_path_to_directory_to_store_report> |
| 51 | + --create_pdf |
| 52 | +``` |
| 53 | +where |
| 54 | +- `--baseline` Required. The full path to the baseline results for the comparison |
| 55 | +- `--archives` Required. A comma-separated list of directories containing results to compare to the baseline |
| 56 | +- `--output_directory` Required. The directory to store the markdown report file and relevant plots. |
| 57 | +- `--create_pdf` Optional. Create a pdf report |
| 58 | + |
| 59 | +#### Examples |
| 60 | +```bash |
| 61 | +PYTHONPATH=/cbt /cbt/tools/generate_comparison_performance_report.py --baseline="/tmp/ch_cbt_main_run" --archives="/tmp/ch_sandbox/" --output_directory="/tmp/reports/main" --create_pdf |
| 62 | +``` |
0 commit comments