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

Add MinValue/MaxValue helpers on our NumericAttributeTraits. #35390

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

bzbarsky-apple
Copy link
Contributor

Uses the new helpers in SceneHandlerImpl.

Fixes #35328

Review note: git diff is a bit annoyingly confused on the odd-sized-integers bits. The PR does not in fact change anything about Encode() or ToAttributeStoreRepresentation().

Copy link

Review changes with SemanticDiff.

Copy link

github-actions bot commented Sep 4, 2024

PR #35390: Size comparison from 5d3147c to 39d2244

Full report (77 builds for bl602, bl702, bl702l, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 5d3147c 39d2244 change % change
bl602 lighting-app bl602 FLASH 1279604 1279604 0 0.0
RAM 95904 95904 0 0.0
bl602+mfd FLASH 1293458 1293458 0 0.0
RAM 96048 96048 0 0.0
bl602+rpc FLASH 1318568 1318568 0 0.0
RAM 104328 104328 0 0.0
bl702 lighting-app bl702 FLASH 945190 945190 0 0.0
RAM 15209 15209 0 0.0
bl702+mfd FLASH 947334 947334 0 0.0
RAM 15353 15353 0 0.0
bl702+rpc FLASH 1040246 1040246 0 0.0
RAM 24221 24221 0 0.0
bl706-eth FLASH 648006 648006 0 0.0
RAM 25305 25305 0 0.0
bl706-wifi FLASH 895420 895420 0 0.0
RAM 14525 14525 0 0.0
bl702l lighting-app bl702l FLASH 961594 961594 0 0.0
RAM 16868 16868 0 0.0
bl702l+mfd FLASH 964216 964216 0 0.0
RAM 17012 17012 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677257 675545 -1712 -0.3
RAM 78324 78324 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697117 695405 -1712 -0.2
RAM 80956 80956 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697117 695405 -1712 -0.2
RAM 80956 80956 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654045 652333 -1712 -0.3
RAM 73392 73392 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611193 611201 8 0.0
RAM 71292 71292 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 630821 630829 8 0.0
RAM 73844 73844 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 630821 630829 8 0.0
RAM 73844 73844 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 629233 629241 8 0.0
RAM 74308 74308 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 648941 648949 8 0.0
RAM 76860 76860 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 648941 648949 8 0.0
RAM 76860 76860 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 603501 603509 8 0.0
RAM 68348 68348 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 623361 623369 8 0.0
RAM 70980 70980 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 623361 623369 8 0.0
RAM 70980 70980 0 0.0
efr32 lighting-app BRD4187C FLASH 935316 933588 -1728 -0.2
RAM 135120 135120 0 0.0
lock-app BRD4338a FLASH 740764 740764 0 0.0
RAM 197184 197184 0 0.0
window-app BRD4187C FLASH 1017456 1017448 -8 -0.0
RAM 127060 127060 0 0.0
esp32 all-clusters-app c3devkit DRAM 94224 94224 0 0.0
FLASH 1540250 1537954 -2296 -0.1
IRAM 82538 82538 0 0.0
m5stack DRAM 115160 115160 0 0.0
FLASH 1550698 1548286 -2412 -0.2
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4624 4624 0 0.0
FLASH 2763665 2764241 576 0.0
RAM 128536 128536 0 0.0
all-clusters-app debug unknown 5408 5408 0 0.0
FLASH 6078532 6074758 -3774 -0.1
RAM 510536 510536 0 0.0
all-clusters-minimal-app debug unknown 5304 5304 0 0.0
FLASH 5402956 5399180 -3776 -0.1
RAM 240376 240376 0 0.0
bridge-app debug unknown 5288 5288 0 0.0
FLASH 4732472 4733048 576 0.0
RAM 217368 217368 0 0.0
chip-tool debug unknown 5832 5832 0 0.0
FLASH 12651036 12651614 578 0.0
RAM 558354 558354 0 0.0
chip-tool-ipv6only arm64 unknown 20352 20352 0 0.0
FLASH 11322892 11323676 784 0.0
RAM 608424 608424 0 0.0
fabric-admin debug unknown 5664 5664 0 0.0
FLASH 10957287 10957865 578 0.0
RAM 557354 557354 0 0.0
fabric-bridge-app debug unknown 4520 4520 0 0.0
FLASH 4555270 4555848 578 0.0
RAM 204016 204016 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5684369 5680561 -3808 -0.1
RAM 228184 228184 0 0.0
lock-app debug unknown 5224 5224 0 0.0
FLASH 4787074 4787650 576 0.0
RAM 203768 203768 0 0.0
ota-provider-app debug unknown 4600 4600 0 0.0
FLASH 4426612 4427188 576 0.0
RAM 197752 197752 0 0.0
ota-requestor-app debug unknown 4536 4536 0 0.0
FLASH 4565198 4565774 576 0.0
RAM 202288 202288 0 0.0
shell debug unknown 4176 4176 0 0.0
FLASH 3105277 3101517 -3760 -0.1
RAM 159168 159168 0 0.0
thermostat-no-ble arm64 unknown 9296 9296 0 0.0
FLASH 4325900 4326684 784 0.0
RAM 241896 241896 0 0.0
tv-app debug unknown 5504 5504 0 0.0
FLASH 6011813 6012389 576 0.0
RAM 583192 583192 0 0.0
tv-casting-app debug unknown 5168 5168 0 0.0
FLASH 10854957 10855533 576 0.0
RAM 645768 645768 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915384 913672 -1712 -0.2
RAM 142243 142243 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886616 885512 -1104 -0.1
RAM 140382 140382 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846812 845096 -1716 -0.2
RAM 141062 141062 0 0.0
nxp contact k32w0+release FLASH 577796 577796 0 0.0
RAM 70444 70444 0 0.0
k32w1+release FLASH 593248 593248 0 0.0
RAM 62712 62712 0 0.0
light k32w0+release FLASH 613416 613432 16 0.0
RAM 69908 69908 0 0.0
k32w1+release FLASH 676872 676888 16 0.0
RAM 47848 47848 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1647932 1645884 -2048 -0.1
RAM 210944 210944 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1551604 1549556 -2048 -0.1
RAM 207656 207656 0 0.0
light cy8ckit_062s2_43012 FLASH 1470396 1468332 -2064 -0.1
RAM 200752 200752 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463636 1463620 -16 -0.0
RAM 225064 225064 0 0.0
qpg lighting-app qpg6105+debug FLASH 656812 656828 16 0.0
RAM 105152 105152 0 0.0
lock-app qpg6105+debug FLASH 614208 614208 0 0.0
RAM 99612 99612 0 0.0
stm32 light STM32WB5MM-DK FLASH 483216 481504 -1712 -0.4
RAM 144740 144740 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 620504 620522 18 0.0
RAM 50932 50932 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 687434 685996 -1438 -0.2
RAM 149576 149576 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 779874 778436 -1438 -0.2
RAM 110736 110736 0 0.0
bridge-app tlsr9258a FLASH 679496 679514 18 0.0
RAM 91588 91588 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622096 622114 18 0.0
RAM 50972 50972 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708106 708124 18 0.0
RAM 74312 74312 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625734 624296 -1438 -0.2
RAM 145556 145556 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811866 810428 -1438 -0.2
RAM 99480 99480 0 0.0
lock-app-dfu tlsr9528a FLASH 655078 655096 18 0.0
RAM 67008 67008 0 0.0
ota-requestor-app tlsr9258a FLASH 697362 697380 18 0.0
RAM 91272 91272 0 0.0
pump-app-usb tlsr9518adk80d FLASH 631804 631822 18 0.0
RAM 55752 55752 0 0.0
pump-controller-app tlsr9518adk80d FLASH 609052 609070 18 0.0
RAM 52996 52996 0 0.0
shell tlsr9518adk80d FLASH 466890 466890 0 0.0
RAM 68660 68660 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628882 628900 18 0.0
RAM 52692 52692 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 653034 653052 18 0.0
RAM 56632 56632 0 0.0
thermostat tlsr9518adk80d FLASH 635784 635802 18 0.0
RAM 53400 53400 0 0.0
window-covering tlsr9118bdk40d FLASH 523038 523056 18 0.0
RAM 98532 98532 0 0.0
tizen all-clusters-app arm unknown 4840 4840 0 0.0
FLASH 1724876 1721204 -3672 -0.2
RAM 89500 89500 0 0.0
chip-tool-ubsan arm unknown 10272 10272 0 0.0
FLASH 17511238 17511446 208 0.0
RAM 7601356 7601228 -128 -0.0

Copy link

github-actions bot commented Sep 4, 2024

PR #35390: Size comparison from 5d3147c to acfd3b4

Increases above 0.2%:

platform target config section 5d3147c acfd3b4 change % change
cyw30739 light CYW30739B2-P5-EVK-01 RAM 78324 78556 232 0.3
CYW30739B2-P5-EVK-02 RAM 80956 81188 232 0.3
CYW30739B2-P5-EVK-03 RAM 80956 81188 232 0.3
CYW930739M2EVB-02 RAM 73392 73624 232 0.3
light-switch CYW30739B2-P5-EVK-01 FLASH 611193 614561 3368 0.6
RAM 71292 71524 232 0.3
CYW30739B2-P5-EVK-02 FLASH 630821 634197 3376 0.5
RAM 73844 74076 232 0.3
CYW30739B2-P5-EVK-03 FLASH 630821 634197 3376 0.5
RAM 73844 74076 232 0.3
lock CYW30739B2-P5-EVK-01 FLASH 629233 632593 3360 0.5
RAM 74308 74540 232 0.3
CYW30739B2-P5-EVK-02 FLASH 648941 652309 3368 0.5
RAM 76860 77092 232 0.3
CYW30739B2-P5-EVK-03 FLASH 648941 652309 3368 0.5
RAM 76860 77092 232 0.3
thermostat CYW30739B2-P5-EVK-01 FLASH 603501 606885 3384 0.6
RAM 68348 68580 232 0.3
CYW30739B2-P5-EVK-02 FLASH 623361 626737 3376 0.5
RAM 70980 71212 232 0.3
CYW30739B2-P5-EVK-03 FLASH 623361 626737 3376 0.5
RAM 70980 71212 232 0.3
nxp contact k32w0+release FLASH 577796 579420 1624 0.3
RAM 70444 70676 232 0.3
light k32w0+release FLASH 613416 615048 1632 0.3
RAM 69908 70140 232 0.3
qpg lock-app qpg6105+debug FLASH 614208 615880 1672 0.3
Full report (77 builds for bl602, bl702, bl702l, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 5d3147c acfd3b4 change % change
bl602 lighting-app bl602 FLASH 1279604 1279604 0 0.0
RAM 95904 95904 0 0.0
bl602+mfd FLASH 1293458 1293458 0 0.0
RAM 96048 96048 0 0.0
bl602+rpc FLASH 1318568 1318568 0 0.0
RAM 104328 104328 0 0.0
bl702 lighting-app bl702 FLASH 945190 944934 -256 -0.0
RAM 15209 15209 0 0.0
bl702+mfd FLASH 947334 947334 0 0.0
RAM 15353 15353 0 0.0
bl702+rpc FLASH 1040246 1040246 0 0.0
RAM 24221 24221 0 0.0
bl706-eth FLASH 648006 648006 0 0.0
RAM 25305 25305 0 0.0
bl706-wifi FLASH 895420 895420 0 0.0
RAM 14525 14525 0 0.0
bl702l lighting-app bl702l FLASH 961594 961594 0 0.0
RAM 16868 16868 0 0.0
bl702l+mfd FLASH 964216 964216 0 0.0
RAM 17012 17012 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677257 678233 976 0.1
RAM 78324 78556 232 0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697117 698085 968 0.1
RAM 80956 81188 232 0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697117 698085 968 0.1
RAM 80956 81188 232 0.3
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654045 655021 976 0.1
RAM 73392 73624 232 0.3
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611193 614561 3368 0.6
RAM 71292 71524 232 0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 630821 634197 3376 0.5
RAM 73844 74076 232 0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 630821 634197 3376 0.5
RAM 73844 74076 232 0.3
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 629233 632593 3360 0.5
RAM 74308 74540 232 0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 648941 652309 3368 0.5
RAM 76860 77092 232 0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 648941 652309 3368 0.5
RAM 76860 77092 232 0.3
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 603501 606885 3384 0.6
RAM 68348 68580 232 0.3
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 623361 626737 3376 0.5
RAM 70980 71212 232 0.3
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 623361 626737 3376 0.5
RAM 70980 71212 232 0.3
efr32 lighting-app BRD4187C FLASH 935316 933620 -1696 -0.2
RAM 135120 135120 0 0.0
lock-app BRD4338a FLASH 740764 740780 16 0.0
RAM 197184 197184 0 0.0
window-app BRD4187C FLASH 1017456 1017448 -8 -0.0
RAM 127060 127060 0 0.0
esp32 all-clusters-app c3devkit DRAM 94224 94224 0 0.0
FLASH 1540250 1537860 -2390 -0.2
IRAM 82538 82538 0 0.0
m5stack DRAM 115160 115160 0 0.0
FLASH 1550698 1548246 -2452 -0.2
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4624 4624 0 0.0
FLASH 2763665 2764241 576 0.0
RAM 128536 128536 0 0.0
all-clusters-app debug unknown 5408 5408 0 0.0
FLASH 6078532 6074760 -3772 -0.1
RAM 510536 510536 0 0.0
all-clusters-minimal-app debug unknown 5304 5304 0 0.0
FLASH 5402956 5399180 -3776 -0.1
RAM 240376 240376 0 0.0
bridge-app debug unknown 5288 5288 0 0.0
FLASH 4732472 4733048 576 0.0
RAM 217368 217368 0 0.0
chip-tool debug unknown 5832 5832 0 0.0
FLASH 12651036 12651618 582 0.0
RAM 558354 558354 0 0.0
chip-tool-ipv6only arm64 unknown 20352 20352 0 0.0
FLASH 11322892 11323660 768 0.0
RAM 608424 608424 0 0.0
fabric-admin debug unknown 5664 5664 0 0.0
FLASH 10957287 10957869 582 0.0
RAM 557354 557354 0 0.0
fabric-bridge-app debug unknown 4520 4520 0 0.0
FLASH 4555270 4555848 578 0.0
RAM 204016 204016 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5684369 5680561 -3808 -0.1
RAM 228184 228184 0 0.0
lock-app debug unknown 5224 5224 0 0.0
FLASH 4787074 4787650 576 0.0
RAM 203768 203768 0 0.0
ota-provider-app debug unknown 4600 4600 0 0.0
FLASH 4426612 4427188 576 0.0
RAM 197752 197752 0 0.0
ota-requestor-app debug unknown 4536 4536 0 0.0
FLASH 4565198 4565774 576 0.0
RAM 202288 202288 0 0.0
shell debug unknown 4176 4176 0 0.0
FLASH 3105277 3101517 -3760 -0.1
RAM 159168 159168 0 0.0
thermostat-no-ble arm64 unknown 9296 9296 0 0.0
FLASH 4325900 4326684 784 0.0
RAM 241896 241896 0 0.0
tv-app debug unknown 5504 5504 0 0.0
FLASH 6011813 6012389 576 0.0
RAM 583192 583192 0 0.0
tv-casting-app debug unknown 5168 5168 0 0.0
FLASH 10854957 10855533 576 0.0
RAM 645768 645768 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 915384 913696 -1688 -0.2
RAM 142243 142243 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 886616 885504 -1112 -0.1
RAM 140382 140382 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 846812 845120 -1692 -0.2
RAM 141062 141062 0 0.0
nxp contact k32w0+release FLASH 577796 579420 1624 0.3
RAM 70444 70676 232 0.3
k32w1+release FLASH 593248 593248 0 0.0
RAM 62712 62712 0 0.0
light k32w0+release FLASH 613416 615048 1632 0.3
RAM 69908 70140 232 0.3
k32w1+release FLASH 676872 676872 0 0.0
RAM 47848 47848 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1647932 1645900 -2032 -0.1
RAM 210944 210944 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1551604 1549572 -2032 -0.1
RAM 207656 207656 0 0.0
light cy8ckit_062s2_43012 FLASH 1470396 1468348 -2048 -0.1
RAM 200752 200752 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463636 1463636 0 0.0
RAM 225064 225064 0 0.0
qpg lighting-app qpg6105+debug FLASH 656812 657708 896 0.1
RAM 105152 105192 40 0.0
lock-app qpg6105+debug FLASH 614208 615880 1672 0.3
RAM 99612 99660 48 0.0
stm32 light STM32WB5MM-DK FLASH 483216 481528 -1688 -0.3
RAM 144740 144740 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 620504 620508 4 0.0
RAM 50932 50932 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 687434 686000 -1434 -0.2
RAM 149576 149576 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 779874 778440 -1434 -0.2
RAM 110736 110736 0 0.0
bridge-app tlsr9258a FLASH 679496 679500 4 0.0
RAM 91588 91588 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 622096 622100 4 0.0
RAM 50972 50972 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708106 708110 4 0.0
RAM 74312 74312 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625734 624300 -1434 -0.2
RAM 145556 145556 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811866 810432 -1434 -0.2
RAM 99480 99480 0 0.0
lock-app-dfu tlsr9528a FLASH 655078 655082 4 0.0
RAM 67008 67008 0 0.0
ota-requestor-app tlsr9258a FLASH 697362 697366 4 0.0
RAM 91272 91272 0 0.0
pump-app-usb tlsr9518adk80d FLASH 631804 631808 4 0.0
RAM 55752 55752 0 0.0
pump-controller-app tlsr9518adk80d FLASH 609052 609056 4 0.0
RAM 52996 52996 0 0.0
shell tlsr9518adk80d FLASH 466890 466890 0 0.0
RAM 68660 68660 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 628882 628886 4 0.0
RAM 52692 52692 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 653034 653038 4 0.0
RAM 56632 56632 0 0.0
thermostat tlsr9518adk80d FLASH 635784 635788 4 0.0
RAM 53400 53400 0 0.0
window-covering tlsr9118bdk40d FLASH 523038 523042 4 0.0
RAM 98532 98532 0 0.0
tizen all-clusters-app arm unknown 4840 4840 0 0.0
FLASH 1724876 1721204 -3672 -0.2
RAM 89500 89500 0 0.0
chip-tool-ubsan arm unknown 10272 10272 0 0.0
FLASH 17511238 17511502 264 0.0
RAM 7601356 7601260 -96 -0.0

@mergify mergify bot merged commit 3621c43 into project-chip:master Sep 5, 2024
67 checks passed
@bzbarsky-apple bzbarsky-apple deleted the add-int-type-min-max branch September 5, 2024 17:58
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.

[Feature] NumericAttributeTraits max/min
3 participants