Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chiptest] Wait for subprocess instead of polling #15968

Merged
merged 1 commit into from
Mar 8, 2022

Conversation

arkq
Copy link
Contributor

@arkq arkq commented Mar 8, 2022

Problem

Polling for subprocess return-code hogs CPU (chiptest Python process uses 100% CPU). Instead of polling it's better to use wait() call, which effectively puts Python process into sleep until subprocess terminates.

Change overview

  • refactor active polling code and replace it with proper wait() calls.

Testing

Witch this changes, running ./scripts/tests/run_test_suite.py run does not show 100% CPU usage for run_test_suite.py process.

Polling for subprocess return-code hogs CPU (chiptest Python process
uses 100% CPU). Instead of polling it's better to use wait() call, which
effectively puts Python process into sleep until subprocess terminates.
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

PR #15968: Size comparison from 2822511 to a9bb972

Full report (26 builds for cyw30739, efr32, esp32, k32w, linux, nrfconnect, p6, telink)
platform target config section 2822511 a9bb972 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 601810 601810 0 0.0
.app_xip_area 506352 506352 0 0.0
.bss 78140 78140 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 559722 559722 0 0.0
.app_xip_area 465800 465800 0 0.0
.bss 76644 76644 0 0.0
.data 624 624 0 0.0
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 581918 581918 0 0.0
.app_xip_area 478316 478316 0 0.0
.bss 85972 85972 0 0.0
.data 592 592 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 920868 920868 0 0.0
(read/write) 128848 128848 0 0.0
.bss 126768 126768 0 0.0
.data 2080 2080 0 0.0
.text 920860 920860 0 0.0
BRD4161A+rpc (read only) 949688 949688 0 0.0
(read/write) 144808 144808 0 0.0
.bss 142544 142544 0 0.0
.data 2260 2260 0 0.0
.text 949680 949680 0 0.0
window-app BRD4161A (read only) 853888 853888 0 0.0
(read/write) 126840 126840 0 0.0
.bss 124912 124912 0 0.0
.data 1924 1924 0 0.0
.text 853880 853880 0 0.0
esp32 all-clusters-app c3devkit (read only) 957506 957506 0 0.0
(read/write) 1393618 1393618 0 0.0
.dram0.bss 63432 63432 0 0.0
.dram0.data 14236 14236 0 0.0
.flash.rodata 197032 197032 0 0.0
.flash.text 957506 957506 0 0.0
.iram0.text 62016 62016 0 0.0
m5stack (read only) 1012267 1012267 0 0.0
(read/write) 460724 460724 0 0.0
.dram0.bss 68960 68960 0 0.0
.dram0.data 34080 34080 0 0.0
.flash.rodata 225848 225848 0 0.0
.flash.text 1006883 1006883 0 0.0
.iram0.text 123107 123107 0 0.0
k32w light k32w061+release (read/write) 694852 694852 0 0.0
.bss 77704 77704 0 0.0
.data 1964 1964 0 0.0
.text 609384 609384 0 0.0
lock k32w061+release (read/write) 696456 696456 0 0.0
.bss 77672 77672 0 0.0
.data 1972 1972 0 0.0
.text 611012 611012 0 0.0
linux all-clusters-app debug (read only) 2426809 2426809 0 0.0
(read/write) 145600 145600 0 0.0
.bss 60128 60128 0 0.0
.data 1392 1392 0 0.0
.data.rel.ro 78360 78360 0 0.0
.dynamic 592 592 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 920 920 0 0.0
.rodata 205509 205509 0 0.0
.text 2058434 2058434 0 0.0
bridge-app debug+rpc (read only) 1731837 1731837 0 0.0
(read/write) 92560 92560 0 0.0
.bss 47432 47432 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 38008 38008 0 0.0
.dynamic 592 592 0 0.0
.got 3928 3928 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 141748 141748 0 0.0
.text 1474213 1474213 0 0.0
chip-tool debug (read only) 9758533 9758533 0 0.0
(read/write) 338488 338488 0 0.0
.bss 25512 25512 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 305816 305816 0 0.0
.dynamic 608 608 0 0.0
.got 4776 4776 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 510868 510868 0 0.0
.text 8508373 8508373 0 0.0
chip-tool-ipv6only arm64 (read only) 9430548 9430548 0 0.0
(read/write) 454177 454177 0 0.0
.bss 43825 43825 0 0.0
.data 1200 1200 0 0.0
.data.rel.ro 351000 351000 0 0.0
.dynamic 560 560 0 0.0
.got 54360 54360 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 486556 486556 0 0.0
.text 7940244 7940244 0 0.0
door-lock-app debug (read only) 1946161 1946161 0 0.0
(read/write) 119008 119008 0 0.0
.bss 50432 50432 0 0.0
.data 1056 1056 0 0.0
.data.rel.ro 62136 62136 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 664 664 0 0.0
.rodata 173660 173660 0 0.0
.text 1623954 1623954 0 0.0
lighting-app debug+rpc (read only) 2078233 2078233 0 0.0
(read/write) 124376 124376 0 0.0
.bss 51264 51264 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 66040 66040 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 720 720 0 0.0
.rodata 165852 165852 0 0.0
.text 1756866 1756866 0 0.0
ota-provider-app debug (read only) 1879017 1879017 0 0.0
(read/write) 114640 114640 0 0.0
.bss 50240 50240 0 0.0
.data 1352 1352 0 0.0
.data.rel.ro 57416 57416 0 0.0
.dynamic 608 608 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 158899 158899 0 0.0
.text 1569490 1569490 0 0.0
ota-requestor-app debug (read only) 1901001 1901001 0 0.0
(read/write) 117352 117352 0 0.0
.bss 51296 51296 0 0.0
.data 1512 1512 0 0.0
.data.rel.ro 59112 59112 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 154188 154188 0 0.0
.text 1596850 1596850 0 0.0
shell debug (read only) 2392969 2392969 0 0.0
(read/write) 149752 149752 0 0.0
.bss 70216 70216 0 0.0
.data 864 864 0 0.0
.data.rel.ro 73008 73008 0 0.0
.dynamic 592 592 0 0.0
.got 4160 4160 0 0.0
.init 27 27 0 0.0
.init_array 904 904 0 0.0
.rodata 205458 205458 0 0.0
.text 2031058 2031058 0 0.0
thermostat-no-ble arm64 (read only) 2174612 2174612 0 0.0
(read/write) 148465 148465 0 0.0
.bss 65201 65201 0 0.0
.data 1080 1080 0 0.0
.data.rel.ro 75000 75000 0 0.0
.dynamic 560 560 0 0.0
.got 4216 4216 0 0.0
.init 24 24 0 0.0
.init_array 352 352 0 0.0
.rodata 133012 133012 0 0.0
.text 1823312 1823312 0 0.0
tv-app debug (read only) 2617097 2617097 0 0.0
(read/write) 250648 250648 0 0.0
.bss 167904 167904 0 0.0
.data 3200 3200 0 0.0
.data.rel.ro 73504 73504 0 0.0
.dynamic 592 592 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 880 880 0 0.0
.rodata 199453 199453 0 0.0
.text 2243746 2243746 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1151827 1151827 0 0.0
bss 146792 146792 0 0.0
rodata 144300 144300 0 0.0
text 785544 785544 0 0.0
p6 all-clusters-app default (read/write) 2494064 2494064 0 0.0
.bss 119504 119504 0 0.0
.data 2696 2696 0 0.0
.text 1452328 1452328 0 0.0
light-app default (read/write) 2397504 2397504 0 0.0
.bss 112976 112976 0 0.0
.data 2544 2544 0 0.0
.text 1355768 1355768 0 0.0
lock-app default (read/write) 2360936 2360936 0 0.0
.bss 112720 112720 0 0.0
.data 2504 2504 0 0.0
.text 1319200 1319200 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 888986 888986 0 0.0
bss 86928 86928 0 0.0
noinit 37160 37160 0 0.0
text 628350 628350 0 0.0

Copy link
Contributor

@woody-apple woody-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fast tracking testing updates.

@woody-apple woody-apple merged commit 25f99ad into project-chip:master Mar 8, 2022
@arkq arkq deleted the chiptest-wait branch March 9, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants