From ea5ea90bb625649756afa7ae05a8fb0af860091d Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Tue, 18 Dec 2018 11:33:37 +0000 Subject: docs/dev_info/processing_output: Fix formatting --- .../how_tos/processing_output.rst | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/doc/source/developer_information/how_tos/processing_output.rst b/doc/source/developer_information/how_tos/processing_output.rst index 18b6ca3e..72151504 100644 --- a/doc/source/developer_information/how_tos/processing_output.rst +++ b/doc/source/developer_information/how_tos/processing_output.rst @@ -152,10 +152,6 @@ For the purposes of this report, they will be used to augment the metric's name. scores[workload][name][freq] = metric - rows = [] - for workload in sorted(scores.keys()): - wldata = scores[workload] - Once the metrics have been sorted, generate the report showing the delta between the two configurations (indicated by the "frequency" classifier) and highlight any unexpected deltas (based on the ``lower_is_better`` attribute of @@ -165,23 +161,27 @@ statically significant deltas.) .. code-block:: python - for name in sorted(wldata.keys()): - min_score = wldata[name]['min'].value - max_score = wldata[name]['max'].value - delta = max_score - min_score - units = wldata[name]['min'].units or '' - lib = wldata[name]['min'].lower_is_better + rows = [] + for workload in sorted(scores.keys()): + wldata = scores[workload] + + for name in sorted(wldata.keys()): + min_score = wldata[name]['min'].value + max_score = wldata[name]['max'].value + delta = max_score - min_score + units = wldata[name]['min'].units or '' + lib = wldata[name]['min'].lower_is_better - warn = '' - if (lib and delta > 0) or (not lib and delta < 0): - warn = '!!!' + warn = '' + if (lib and delta > 0) or (not lib and delta < 0): + warn = '!!!' - rows.append([workload, name, - '{:.3f}'.format(min_score), '{:.3f}'.format(max_score), - '{:.3f}'.format(delta), units, warn]) + rows.append([workload, name, + '{:.3f}'.format(min_score), '{:.3f}'.format(max_score), + '{:.3f}'.format(delta), units, warn]) - # separate workloads with a blank row - rows.append(['', '', '', '', '', '', '']) + # separate workloads with a blank row + rows.append(['', '', '', '', '', '', '']) write_table(rows, sys.stdout, align='<<>>><<', @@ -276,23 +276,23 @@ Below is the complete example code, and a report it generated for a sample run. for workload in sorted(scores.keys()): wldata = scores[workload] - for name in sorted(wldata.keys()): - min_score = wldata[name]['min'].value - max_score = wldata[name]['max'].value - delta = max_score - min_score - units = wldata[name]['min'].units or '' - lib = wldata[name]['min'].lower_is_better + for name in sorted(wldata.keys()): + min_score = wldata[name]['min'].value + max_score = wldata[name]['max'].value + delta = max_score - min_score + units = wldata[name]['min'].units or '' + lib = wldata[name]['min'].lower_is_better - warn = '' - if (lib and delta > 0) or (not lib and delta < 0): - warn = '!!!' + warn = '' + if (lib and delta > 0) or (not lib and delta < 0): + warn = '!!!' - rows.append([workload, name, - '{:.3f}'.format(min_score), '{:.3f}'.format(max_score), - '{:.3f}'.format(delta), units, warn]) + rows.append([workload, name, + '{:.3f}'.format(min_score), '{:.3f}'.format(max_score), + '{:.3f}'.format(delta), units, warn]) - # separate workloads with a blank row - rows.append(['', '', '', '', '', '', '']) + # separate workloads with a blank row + rows.append(['', '', '', '', '', '', '']) write_table(rows, sys.stdout, align='<<>>><<', -- cgit v1.2.3