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

Optimize SystemObject unit test #8812

Merged
merged 2 commits into from
Aug 6, 2021
Merged

Optimize SystemObject unit test #8812

merged 2 commits into from
Aug 6, 2021

Conversation

yufengwangca
Copy link
Contributor

@yufengwangca yufengwangca commented Aug 5, 2021

Problem

What is being fixed? Examples:

  • SystemObject Unit Test take more than 10s to complete on my local Linux machine, and it does not test ObjectPool boundary condition since kPoolSize(122) is not set as a multiple of kNumThreads(16).

Change overview

  • Reduce alloc/free iteration from 100000 to 1000 to make SystemObject unit test complete within 2 seconds.
  • Set kPoolSize to 112 to be multiple of kNumThreads(16).

Testing

How was this tested? (at least one bullet point required)

  • $ ./TestSystemObject
'#0:','chip-system-object'
'#2:','Setup                   ','PASSED'
'#3:','Retention               ','PASSED'
'#3:','Concurrency             ','PASSED'
'#3:','HighWatermark           ','PASSED'
'#3:','HighWatermarkConcurrency','PASSED'
'#4:','Teardown                ','PASSED'
'#6:','0','4'
'#7:','0','83429'

@boring-cyborg boring-cyborg bot added the system label Aug 5, 2021
@yufengwangca yufengwangca changed the title Optimize SystemObject unit test to complete within 2 seconds Optimize SystemObject unit test Aug 5, 2021
@github-actions
Copy link

github-actions bot commented Aug 6, 2021

Size increase report for "esp32-example-build" from 0be8905

File Section File VM
chip-ipv6only-app.elf .flash.text 172 172
chip-all-clusters-app.elf .flash.text -80 -80
chip-bridge-app.elf .flash.text 68 68
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-ipv6only-app.elf and ./pull_artifact/chip-ipv6only-app.elf:

sections,vmsize,filesize
.flash.text,172,172
[Unmapped],0,-172

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
[Unmapped],0,80
.flash.text,-80,-80

Comparing ./master_artifact/chip-bridge-app.elf and ./pull_artifact/chip-bridge-app.elf:

sections,vmsize,filesize
.flash.text,68,68
[Unmapped],0,-68

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize


@saurabhst saurabhst merged commit d2857bd into project-chip:master Aug 6, 2021
@yufengwangca yufengwangca deleted the pr/system/object branch August 10, 2021 21:39
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Optimize SystemObject unit test to complete within 2 seconds

* Add static_assert check
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.

5 participants