Re: [Powertop] [PATCH 19/29] report: redesign System Information csv and html
Igor Zhbanov <i.zhbanov at samsung.com>
| Newsgroups | dev.linux.lists.powertop |
|---|---|
| Message-ID | <[email protected]> |
Hi Alexandra,
Alexandra Yates wrote:
> Enabled "System Information" section for csv and html report design.
>
> Signed-off-by: Alexandra Yates <alexandra.yates(a)linux.intel.com>
> ---
> src/process/do_process.cpp | 113 ++++++++++++++++++++++-----------------
> src/report/report-data-html.cpp | 11 +++-
> src/report/report-data-html.h | 2 +
> 3 files changed, 77 insertions(+), 49 deletions(-)
>
> diff --git a/src/process/do_process.cpp b/src/process/do_process.cpp
> index 6708f12..c50fdd3 100644
> --- a/src/process/do_process.cpp
> +++ b/src/process/do_process.cpp
> @@ -889,42 +889,48 @@ void report_process_update_display(void)
...
>
> - report.begin_section(SECTION_SOFTWARE);
> - report.add_header(__("Overview of Software Power Consumers"));
> - report.begin_table(TABLE_WIDE);
> - report.begin_row();
> - if (show_power) {
> - report.begin_cell(CELL_SOFTWARE_HEADER);
> - report.add(__("Power est."));
> - }
> + /* Set Table attributes, rows, and cols */
> + cols=7;
> + if (show_power)
> + cols=8;
>
> - report.begin_cell(CELL_SOFTWARE_HEADER);
> - report.add(__("Usage"));
> - report.begin_cell(CELL_SOFTWARE_HEADER);
> - report.add(__("Wakeups/s"));
> - report.begin_cell(CELL_SOFTWARE_HEADER);
> - report.add(__("GPU ops/s"));
> - report.begin_cell(CELL_SOFTWARE_HEADER);
> - report.add(__("Disk IO/s"));
> - report.begin_cell(CELL_SOFTWARE_HEADER);
> - report.add(__("GFX Wakeups/s"));
> - report.begin_cell(CELL_SOFTWARE_PROCESS);
> - report.add(__("Category"));
> - report.begin_cell(CELL_SOFTWARE_DESCRIPTION);
> - report.add(__("Description"));
...
> + /* Set array of data in row Major order */
> + string software_data[cols * rows];
> + software_data[0]="Usage";
> + software_data[1]="Wakeups/s";
> + software_data[2]="GPU ops/s";
> + software_data[3]="Disk IO/s";
> + software_data[4]="GFX Wakeups/s";
> + software_data[5]="Category";
> + software_data[6]="Description";
> +
> + if (show_power)
> + software_data[7]="PW Estimate";
>
Didn't you miss the __(...) macro here? This macro is used for localizing
strings to produce reports on another languages too.
Thank you.
--
Best regards,
Igor Zhbanov,
Expert Software Engineer,
phone: +7 (495) 797 25 00 ext 3981
e-mail: i.zhbanov(a)samsung.com
Mobile group, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation