diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2022-08-18 18:39:51 +0900 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2022-08-18 18:39:51 +0900 |
commit | 9378b6a79949f787f437a5abff25d5747ee06e1b (patch) | |
tree | 22a5461a000cbe1317bdb292e0e8617d44605f5b | |
parent | d411572f8b57afe7887119f99a3fe8620715803e (diff) | |
download | pass-9378b6a79949f787f437a5abff25d5747ee06e1b.tar.gz pass-9378b6a79949f787f437a5abff25d5747ee06e1b.tar.bz2 pass-9378b6a79949f787f437a5abff25d5747ee06e1b.zip |
tools: resource-monitor: Keep the alignment of resource attribute namesubmit/tizen/20220818.160813accepted/tizen/unified/20220818.230237
commit f59279ad7f63 ("resource: Change bytes unit attributes to kilo-bytes")
changed the attribute name of both PROCESS_GROUP_ATTR_DISK_READ_PER_SEC
and PROCESS_GROUP_ATTR_DISK_WRITE_PER_SEC. So that break the alignment
when print the resource attribute name by resource-monitor cli tool.
Extend the width length for resource attribute name to keep the printing
alignement.
- Before change:
7: 2| PROCESS_GROUP_ATTR_CPU_UTIL | 0.27 | % | Process-group CPU utilization
7: 3| PROCESS_GROUP_ATTR_DISK_READ_PER_SEC | 0.00 | kB/s | Process-group disk read per second
7: 4| PROCESS_GROUP_ATTR_DISK_WRITE_PER_SEC | 0.00 | kB/s | Process-group disk write per second
7: 5| PROCESS_GROUP_ATTR_MEM_VIRT | 132923188 | kB | Process-group VIRT memory size
- After change:
7: 2| PROCESS_GROUP_ATTR_CPU_UTIL | 0.21 | % | Process-group CPU utilization
7: 3| PROCESS_GROUP_ATTR_DISK_READ_PER_SEC | 0.00 | kB/s | Process-group disk read per second
7: 4| PROCESS_GROUP_ATTR_DISK_WRITE_PER_SEC | 0.00 | kB/s | Process-group disk write per second
7: 5| PROCESS_GROUP_ATTR_MEM_VIRT | 135495517 | kB | Process-group VIRT memory size
Change-Id: I62a937f1edb9c85979cd6f309b12e94256dbeaed
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r-- | tools/resource-monitor/resource-monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/resource-monitor/resource-monitor.c b/tools/resource-monitor/resource-monitor.c index f89a60d..c3d9701 100644 --- a/tools/resource-monitor/resource-monitor.c +++ b/tools/resource-monitor/resource-monitor.c @@ -503,7 +503,7 @@ static void resource_monitor(void) pass_resource_monitor_update(id); printf("-------------------------------------------------------------------------------------------------------------------------------\n"); - printf("%2s:%2s| %35s | %40s | %-5s | %s\n", + printf("%2s:%2s| %40s | %40s | %-5s | %s\n", "", "", "Resource Attribute Name", "Resource Attribute Value", "Unit", "Resource Attribute Description"); printf("-------------------------------------------------------------------------------------------------------------------------------\n"); @@ -511,7 +511,7 @@ static void resource_monitor(void) struct resource_data *res = &g_data.res[i]; for (j = 0; j < res->num_attrs; j++) { - printf("%2d:%2d| %35s | ", i, j, res->attrs[j].name); + printf("%2d:%2d| %40s | ", i, j, res->attrs[j].name); get_resource_attr_value(res, j); printf("\n"); } |