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

Split out Attribute Persistance between safe (can be at libCHIP level) and ember-specific (placed in codegen level) #36658

Merged
merged 29 commits into from
Dec 5, 2024

Conversation

andy31415
Copy link
Contributor

@andy31415 andy31415 commented Nov 27, 2024

Fixes #36476
Fixes #36472

Changes

  • keep AttributePersistenceProvider and SafeAttributePersistenceProvider as interfaces
  • split out the IMPL of these persistence providers into separate locations
  • Moved the Set... and Get... methods out from DefaultPersistenceProvider and place those together with the cpp corresponding to the interface header.
  • Update codegen data model instance to support a storage delegate to let CodegenDataModelProvider be able to set up a default persistence layer if needed
  • Created a reusable StorageDelegateWrapper which places a key/bytespan layer on top of a storage provider delegate since this seems to be a reusable unit across our attribute persistence logic.
  • Moved tests to src/app/tests

@andy31415 andy31415 requested review from a team and arkq as code owners November 27, 2024 18:35
Copy link

Review changes with  SemanticDiff

Copy link

github-actions bot commented Nov 28, 2024

PR #36658: Size comparison from 7805664 to 300fb85

Full report (22 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, qpg, stm32, telink, tizen)
platform target config section 7805664 300fb85 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350998 1351038 40 0.0
RAM 104088 104096 8 0.0
bl702 lighting-app bl702+eth FLASH 650314 650276 -38 -0.0
RAM 25329 25337 8 0.0
bl702+wifi FLASH 827898 827860 -38 -0.0
RAM 14069 14077 8 0.1
bl706+mfd+rpc+littlefs FLASH 1056092 1056054 -38 -0.0
RAM 23917 23917 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 977466 977428 -38 -0.0
RAM 16556 16580 24 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838600 838672 72 0.0
RAM 123640 123648 8 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824284 824332 48 0.0
RAM 125520 125536 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771008 771064 56 0.0
RAM 113988 114004 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755212 755260 48 0.0
RAM 114204 114212 8 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 629454 629562 108 0.0
RAM 205792 205808 16 0.0
lock CC3235SF_LAUNCHXL FLASH 668034 668142 108 0.0
RAM 205936 205952 16 0.0
qpg lighting-app qpg6105+debug FLASH 662928 663000 72 0.0
RAM 105384 105408 24 0.0
lock-app qpg6105+debug FLASH 620764 620796 32 0.0
RAM 99844 99852 8 0.0
stm32 light STM32WB5MM-DK FLASH 483708 483744 36 0.0
RAM 144848 144864 16 0.0
telink bridge-app tlsr9258a FLASH 681716 681786 70 0.0
RAM 91200 91208 8 0.0
contact-sensor-app tlsr9528a_retention FLASH 622122 622186 64 0.0
RAM 31432 31440 8 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 763300 763370 70 0.0
RAM 50212 50220 8 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709366 709436 70 0.0
RAM 73496 73504 8 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 626320 626390 70 0.0
RAM 142132 142140 8 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812228 812298 70 0.0
RAM 99676 99684 8 0.0
tizen all-clusters-app arm unknown 4976 4984 8 0.2
FLASH 1727716 1728088 372 0.0
RAM 90648 90656 8 0.0
chip-tool-ubsan arm unknown 10788 10800 12 0.1
FLASH 17952350 17957830 5480 0.0
RAM 7831780 7833764 1984 0.0

Copy link

github-actions bot commented Nov 28, 2024

PR #36658: Size comparison from 7805664 to 067968a

Full report (39 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, psoc6, qpg, stm32, telink, tizen)
platform target config section 7805664 067968a change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350998 1351038 40 0.0
RAM 104088 104096 8 0.0
bl702 lighting-app bl702+eth FLASH 650314 650276 -38 -0.0
RAM 25329 25337 8 0.0
bl702+wifi FLASH 827898 827860 -38 -0.0
RAM 14069 14077 8 0.1
bl706+mfd+rpc+littlefs FLASH 1056092 1056054 -38 -0.0
RAM 23917 23917 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 977466 977428 -38 -0.0
RAM 16556 16580 24 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838600 838672 72 0.0
RAM 123640 123648 8 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824284 824332 48 0.0
RAM 125520 125536 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771008 771064 56 0.0
RAM 113988 114004 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755212 755260 48 0.0
RAM 114204 114212 8 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 629454 629562 108 0.0
RAM 205792 205808 16 0.0
lock CC3235SF_LAUNCHXL FLASH 668034 668142 108 0.0
RAM 205936 205952 16 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 680273 680313 40 0.0
RAM 78700 78716 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 700125 700165 40 0.0
RAM 81340 81348 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 700125 700165 40 0.0
RAM 81340 81348 8 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 657061 657101 40 0.0
RAM 73768 73784 16 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616953 616993 40 0.0
RAM 71684 71692 8 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 636581 636621 40 0.0
RAM 74228 74244 16 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 636581 636621 40 0.0
RAM 74228 74244 16 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 636345 636393 48 0.0
RAM 74700 74708 8 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 656061 656109 48 0.0
RAM 77244 77260 16 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 656061 656109 48 0.0
RAM 77244 77260 16 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612821 612853 32 0.0
RAM 68780 68796 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 632673 632705 32 0.0
RAM 71420 71428 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 632673 632705 32 0.0
RAM 71420 71428 8 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1644716 1644804 88 0.0
RAM 212072 212088 16 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552492 1552580 88 0.0
RAM 208872 208888 16 0.0
light cy8ckit_062s2_43012 FLASH 1467724 1467812 88 0.0
RAM 200856 200864 8 0.0
lock cy8ckit_062s2_43012 FLASH 1465580 1465684 104 0.0
RAM 225216 225224 8 0.0
qpg lighting-app qpg6105+debug FLASH 662928 663000 72 0.0
RAM 105384 105408 24 0.0
lock-app qpg6105+debug FLASH 620764 620796 32 0.0
RAM 99844 99852 8 0.0
stm32 light STM32WB5MM-DK FLASH 483708 483744 36 0.0
RAM 144848 144864 16 0.0
telink bridge-app tlsr9258a FLASH 681716 681786 70 0.0
RAM 91200 91208 8 0.0
contact-sensor-app tlsr9528a_retention FLASH 622122 622186 64 0.0
RAM 31432 31440 8 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 763300 763370 70 0.0
RAM 50212 50220 8 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709366 709436 70 0.0
RAM 73496 73504 8 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 626320 626390 70 0.0
RAM 142132 142140 8 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812228 812298 70 0.0
RAM 99676 99684 8 0.0
tizen all-clusters-app arm unknown 4976 4984 8 0.2
FLASH 1727716 1728088 372 0.0
RAM 90648 90656 8 0.0
chip-tool-ubsan arm unknown 10788 10800 12 0.1
FLASH 17952350 17957830 5480 0.0
RAM 7831780 7833764 1984 0.0

Copy link

github-actions bot commented Nov 28, 2024

PR #36658: Size comparison from 7805664 to 4f95762

Full report (80 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 7805664 4f95762 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1350998 1351038 40 0.0
RAM 104088 104096 8 0.0
bl702 lighting-app bl702+eth FLASH 650314 650276 -38 -0.0
RAM 25329 25337 8 0.0
bl702+wifi FLASH 827898 827860 -38 -0.0
RAM 14069 14077 8 0.1
bl706+mfd+rpc+littlefs FLASH 1056092 1056054 -38 -0.0
RAM 23917 23917 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 977466 977428 -38 -0.0
RAM 16556 16580 24 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 838600 838672 72 0.0
RAM 123640 123648 8 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 824284 824332 48 0.0
RAM 125520 125536 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771008 771064 56 0.0
RAM 113988 114004 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 755212 755260 48 0.0
RAM 114204 114212 8 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 629454 629562 108 0.0
RAM 205792 205808 16 0.0
lock CC3235SF_LAUNCHXL FLASH 668034 668142 108 0.0
RAM 205936 205952 16 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 680273 680313 40 0.0
RAM 78700 78716 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 700125 700165 40 0.0
RAM 81340 81348 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 700125 700165 40 0.0
RAM 81340 81348 8 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 657061 657101 40 0.0
RAM 73768 73784 16 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 616953 616993 40 0.0
RAM 71684 71692 8 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 636581 636621 40 0.0
RAM 74228 74244 16 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 636581 636621 40 0.0
RAM 74228 74244 16 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 636345 636393 48 0.0
RAM 74700 74708 8 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 656061 656109 48 0.0
RAM 77244 77260 16 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 656061 656109 48 0.0
RAM 77244 77260 16 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 612821 612853 32 0.0
RAM 68780 68796 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 632673 632705 32 0.0
RAM 71420 71428 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 632673 632705 32 0.0
RAM 71420 71428 8 0.0
efr32 lock-app BRD4187C FLASH 931548 931572 24 0.0
RAM 160168 160180 12 0.0
BRD4338a FLASH 744456 744536 80 0.0
RAM 233296 233304 8 0.0
window-app BRD4187C FLASH 1023560 1023640 80 0.0
RAM 128268 128280 12 0.0
esp32 all-clusters-app c3devkit DRAM 95344 95360 16 0.0
FLASH 1542110 1542144 34 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116272 116272 0 0.0
FLASH 1549246 1549222 -24 -0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2707433 2708393 960 0.0
RAM 129656 129656 0 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 5999110 6000036 926 0.0
RAM 523400 523400 0 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5336918 5337906 988 0.0
RAM 242456 242456 0 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4676446 4677402 956 0.0
RAM 218384 218400 16 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12839402 12842468 3066 0.0
RAM 582218 582346 128 0.0
chip-tool-ipv6only arm64 unknown 21304 21328 24 0.1
FLASH 10973728 10976288 2560 0.0
RAM 633168 633304 136 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11243367 11246433 3066 0.0
RAM 582562 582690 128 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4500702 4501658 956 0.0
RAM 205376 205376 0 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5597397 5598405 1008 0.0
RAM 472360 472376 16 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5612961 5613889 928 0.0
RAM 228600 228632 32 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4725832 4726788 956 0.0
RAM 204616 204632 16 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4351370 4352294 924 0.0
RAM 198288 198304 16 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4489738 4490662 924 0.0
RAM 202872 202888 16 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3022029 3023021 992 0.0
RAM 160328 160296 -32 -0.0
thermostat-no-ble arm64 unknown 9512 9528 16 0.2
FLASH 4097088 4097792 704 0.0
RAM 243000 243008 8 0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5950197 5951157 960 0.0
RAM 595888 595872 -16 -0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11046637 11047789 1152 0.0
RAM 691992 692008 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 916616 916656 40 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888720 888824 104 0.0
RAM 141479 141487 8 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 850632 850676 44 0.0
RAM 142200 142200 0 0.0
light-switch-app nrf52840dk_nrf52840 FLASH 793924 793948 24 0.0
RAM 132267 132267 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 938308 938360 52 0.0
RAM 130840 130848 8 0.0
lighting-app nrf52840dk_nrf52840+rpc FLASH 886164 886232 68 0.0
RAM 146685 146693 8 0.0
nrf52840dongle_nrf52840 FLASH 826012 826080 68 0.0
RAM 154547 154555 8 0.0
nrf5340dk_nrf5340_cpuapp FLASH 782272 782340 68 0.0
RAM 145695 145703 8 0.0
nrf7002dk_nrf5340_cpuapp FLASH 938308 938360 52 0.0
RAM 130840 130848 8 0.0
lock-app nrf52840dk_nrf52840 FLASH 809056 809076 20 0.0
RAM 132822 132822 0 0.0
nrf5340dk_nrf5340_cpuapp FLASH 734604 734628 24 0.0
RAM 132952 132952 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 954376 954420 44 0.0
RAM 131395 131403 8 0.0
pump-app nrf52840dk_nrf52840 FLASH 762020 762060 40 0.0
RAM 131613 131613 0 0.0
pump-controller-app nrf52840dk_nrf52840 FLASH 747160 747196 36 0.0
RAM 131372 131372 0 0.0
nxp contact k32w0+release FLASH 584448 584488 40 0.0
RAM 71056 71064 8 0.0
mcxw71+release FLASH 598992 599032 40 0.0
RAM 63152 63160 8 0.0
light k32w0+release FLASH 611388 611428 40 0.0
RAM 70448 70456 8 0.0
k32w1+release FLASH 685504 685544 40 0.0
RAM 48776 48792 16 0.0
lock mcxw71+release FLASH 761840 761880 40 0.0
RAM 70812 70828 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1644716 1644804 88 0.0
RAM 212072 212088 16 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552492 1552580 88 0.0
RAM 208872 208888 16 0.0
light cy8ckit_062s2_43012 FLASH 1467724 1467812 88 0.0
RAM 200856 200864 8 0.0
lock cy8ckit_062s2_43012 FLASH 1465580 1465684 104 0.0
RAM 225216 225224 8 0.0
qpg lighting-app qpg6105+debug FLASH 662928 663000 72 0.0
RAM 105384 105408 24 0.0
lock-app qpg6105+debug FLASH 620764 620796 32 0.0
RAM 99844 99852 8 0.0
stm32 light STM32WB5MM-DK FLASH 483708 483744 36 0.0
RAM 144848 144864 16 0.0
telink bridge-app tlsr9258a FLASH 681716 681786 70 0.0
RAM 91200 91208 8 0.0
contact-sensor-app tlsr9528a_retention FLASH 622122 622186 64 0.0
RAM 31432 31440 8 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 763300 763370 70 0.0
RAM 50212 50220 8 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 709366 709436 70 0.0
RAM 73496 73504 8 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 626320 626390 70 0.0
RAM 142132 142140 8 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812228 812298 70 0.0
RAM 99676 99684 8 0.0
tizen all-clusters-app arm unknown 4976 4984 8 0.2
FLASH 1727716 1728088 372 0.0
RAM 90648 90656 8 0.0
chip-tool-ubsan arm unknown 10788 10800 12 0.1
FLASH 17952350 17957830 5480 0.0
RAM 7831780 7833764 1984 0.0

@mergify mergify bot added the conflict label Nov 29, 2024
@mergify mergify bot removed the conflict label Nov 29, 2024
…s for a run to timeout, set individual tests to short
Copy link

github-actions bot commented Nov 29, 2024

PR #36658: Size comparison from 2474fc3 to 3a409df

Full report (80 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 2474fc3 3a409df change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1352938 1352978 40 0.0
RAM 104104 104112 8 0.0
bl702 lighting-app bl702+eth FLASH 651536 651498 -38 -0.0
RAM 25345 25353 8 0.0
bl702+wifi FLASH 829120 829082 -38 -0.0
RAM 14085 14093 8 0.1
bl706+mfd+rpc+littlefs FLASH 1057314 1057532 218 0.0
RAM 23933 23933 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 978688 978650 -38 -0.0
RAM 16572 16596 24 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 839576 839624 48 0.0
RAM 123656 123664 8 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 825116 825156 40 0.0
RAM 125536 125552 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771864 771896 32 0.0
RAM 114004 114020 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 756052 756092 40 0.0
RAM 114220 114228 8 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 630686 630778 92 0.0
RAM 205808 205824 16 0.0
lock CC3235SF_LAUNCHXL FLASH 669298 669390 92 0.0
RAM 205952 205968 16 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681249 681281 32 0.0
RAM 78716 78724 8 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701101 701133 32 0.0
RAM 81348 81364 16 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701101 701133 32 0.0
RAM 81348 81364 16 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658037 658069 32 0.0
RAM 73784 73792 8 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 617809 617849 40 0.0
RAM 71692 71708 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637437 637477 40 0.0
RAM 74244 74252 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637437 637477 40 0.0
RAM 74244 74252 8 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637201 637241 40 0.0
RAM 74708 74724 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 656917 656957 40 0.0
RAM 77260 77268 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 656917 656957 40 0.0
RAM 77260 77268 8 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613669 613709 40 0.0
RAM 68796 68812 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633521 633561 40 0.0
RAM 71436 71444 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633521 633561 40 0.0
RAM 71436 71444 8 0.0
efr32 lock-app BRD4187C FLASH 932116 932140 24 0.0
RAM 160180 160192 12 0.0
BRD4338a FLASH 745920 746016 96 0.0
RAM 233312 233320 8 0.0
window-app BRD4187C FLASH 1024480 1024568 88 0.0
RAM 128284 128296 12 0.0
esp32 all-clusters-app c3devkit DRAM 95344 95360 16 0.0
FLASH 1543258 1543308 50 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116296 116312 16 0.0
FLASH 1550002 1549974 -28 -0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2713573 2714533 960 0.0
RAM 129768 129800 32 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6005592 6006518 926 0.0
RAM 523512 523544 32 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5343400 5344388 988 0.0
RAM 242568 242600 32 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4682886 4683842 956 0.0
RAM 218432 218448 16 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12845674 12848740 3066 0.0
RAM 582314 582442 128 0.0
chip-tool-ipv6only arm64 unknown 21312 21336 24 0.1
FLASH 10979680 1098227 2592 0.0
RAM 633232 633352 120 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11249739 11252805 3066 0.0
RAM 582690 582818 128 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4507142 4508098 956 0.0
RAM 205504 205504 0 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5603733 5604741 1008 0.0
RAM 472488 472504 16 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5619729 5620657 928 0.0
RAM 228760 228760 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4732240 4733196 956 0.0
RAM 204744 204760 16 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4357994 4358918 924 0.0
RAM 198416 198432 16 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4497034 4497958 924 0.0
RAM 203000 203016 16 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3028413 3029405 992 0.0
RAM 160456 160424 -32 -0.0
thermostat-no-ble arm64 unknown 9520 9536 16 0.2
FLASH 4102464 4103168 704 0.0
RAM 243040 243032 -8 -0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5956245 5957205 960 0.0
RAM 596000 595984 -16 -0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11052557 11053693 1136 0.0
RAM 692120 692136 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 917380 917424 44 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 889868 889964 96 0.0
RAM 141479 141487 8 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 851548 851588 40 0.0
RAM 142200 142200 0 0.0
light-switch-app nrf52840dk_nrf52840 FLASH 794720 794744 24 0.0
RAM 132267 132267 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 939104 939156 52 0.0
RAM 130840 130848 8 0.0
lighting-app nrf52840dk_nrf52840+rpc FLASH 887104 887172 68 0.0
RAM 146685 146693 8 0.0
nrf52840dongle_nrf52840 FLASH 826776 826848 72 0.0
RAM 154547 154555 8 0.0
nrf5340dk_nrf5340_cpuapp FLASH 783184 783256 72 0.0
RAM 145695 145703 8 0.0
nrf7002dk_nrf5340_cpuapp FLASH 939104 939156 52 0.0
RAM 130840 130848 8 0.0
lock-app nrf52840dk_nrf52840 FLASH 809852 809872 20 0.0
RAM 132822 132822 0 0.0
nrf5340dk_nrf5340_cpuapp FLASH 735400 735424 24 0.0
RAM 132952 132952 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 955172 955216 44 0.0
RAM 131395 131403 8 0.0
pump-app nrf52840dk_nrf52840 FLASH 762816 762856 40 0.0
RAM 131613 131613 0 0.0
pump-controller-app nrf52840dk_nrf52840 FLASH 747956 747992 36 0.0
RAM 131372 131372 0 0.0
nxp contact k32w0+release FLASH 585264 585288 24 0.0
RAM 71072 71080 8 0.0
mcxw71+release FLASH 599800 599840 40 0.0
RAM 63168 63176 8 0.0
light k32w0+release FLASH 612204 612244 40 0.0
RAM 70464 70472 8 0.0
k32w1+release FLASH 686344 686400 56 0.0
RAM 48792 48808 16 0.0
lock mcxw71+release FLASH 762680 762712 32 0.0
RAM 70828 70844 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646068 1646156 88 0.0
RAM 212088 212104 16 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553836 1553924 88 0.0
RAM 208888 208904 16 0.0
light cy8ckit_062s2_43012 FLASH 1469108 1469196 88 0.0
RAM 200872 200880 8 0.0
lock cy8ckit_062s2_43012 FLASH 1466836 1466940 104 0.0
RAM 225232 225240 8 0.0
qpg lighting-app qpg6105+debug FLASH 663736 663832 96 0.0
RAM 105400 105424 24 0.0
lock-app qpg6105+debug FLASH 621572 621612 40 0.0
RAM 99860 99868 8 0.0
stm32 light STM32WB5MM-DK FLASH 484492 484536 44 0.0
RAM 144864 144880 16 0.0
telink bridge-app tlsr9258a FLASH 682594 682684 90 0.0
RAM 91200 91208 8 0.0
contact-sensor-app tlsr9528a_retention FLASH 623004 623088 84 0.0
RAM 31432 31440 8 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 764510 764600 90 0.0
RAM 50212 50220 8 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710424 710514 90 0.0
RAM 73496 73504 8 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 627530 627620 90 0.0
RAM 142132 142140 8 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813458 813548 90 0.0
RAM 99676 99684 8 0.0
tizen all-clusters-app arm unknown 4980 4988 8 0.2
FLASH 1731832 1732204 372 0.0
RAM 90724 90732 8 0.0
chip-tool-ubsan arm unknown 10792 10804 12 0.1
FLASH 17965582 17971070 5488 0.0
RAM 7838600 7840584 1984 0.0

Copy link

github-actions bot commented Dec 5, 2024

PR #36658: Size comparison from b0fd385 to 0665c32

Full report (80 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section b0fd385 0665c32 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1352942 1352982 40 0.0
RAM 104104 104112 8 0.0
bl702 lighting-app bl702+eth FLASH 651536 651498 -38 -0.0
RAM 25345 25353 8 0.0
bl702+wifi FLASH 829120 829082 -38 -0.0
RAM 14085 14093 8 0.1
bl706+mfd+rpc+littlefs FLASH 1057314 1057532 218 0.0
RAM 23933 23933 0 0.0
bl702l lighting-app bl702l+mfd+littlefs FLASH 978688 978650 -38 -0.0
RAM 16572 16596 24 0.1
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 839576 839624 48 0.0
RAM 123656 123664 8 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 825116 825156 40 0.0
RAM 125536 125552 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 771864 771896 32 0.0
RAM 114004 114020 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 756052 756092 40 0.0
RAM 114220 114228 8 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 630686 630778 92 0.0
RAM 205808 205824 16 0.0
lock CC3235SF_LAUNCHXL FLASH 669298 669390 92 0.0
RAM 205952 205968 16 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 681249 681281 32 0.0
RAM 78716 78724 8 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 701101 701133 32 0.0
RAM 81348 81364 16 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 701101 701133 32 0.0
RAM 81348 81364 16 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 658037 658069 32 0.0
RAM 73784 73792 8 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 617809 617849 40 0.0
RAM 71692 71708 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 637437 637477 40 0.0
RAM 74244 74252 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 637437 637477 40 0.0
RAM 74244 74252 8 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 637201 637241 40 0.0
RAM 74708 74724 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 656917 656957 40 0.0
RAM 77260 77268 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 656917 656957 40 0.0
RAM 77260 77268 8 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613669 613709 40 0.0
RAM 68796 68812 16 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633521 633561 40 0.0
RAM 71436 71444 8 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633521 633561 40 0.0
RAM 71436 71444 8 0.0
efr32 lock-app BRD4187C FLASH 932116 932140 24 0.0
RAM 160180 160192 12 0.0
BRD4338a FLASH 745824 745904 80 0.0
RAM 233312 233320 8 0.0
window-app BRD4187C FLASH 1024480 1024568 88 0.0
RAM 128284 128296 12 0.0
esp32 all-clusters-app c3devkit DRAM 95344 95360 16 0.0
FLASH 1543262 1543312 50 0.0
IRAM 82542 82542 0 0.0
m5stack DRAM 116296 116312 16 0.0
FLASH 1550006 1549978 -28 -0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4720 4720 0 0.0
FLASH 2713581 2714541 960 0.0
RAM 129768 129800 32 0.0
all-clusters-app debug unknown 5560 5560 0 0.0
FLASH 6005600 6006526 926 0.0
RAM 523512 523544 32 0.0
all-clusters-minimal-app debug unknown 5456 5456 0 0.0
FLASH 5343408 5344396 988 0.0
RAM 242568 242600 32 0.0
bridge-app debug unknown 5440 5440 0 0.0
FLASH 4682894 4683850 956 0.0
RAM 218368 218384 16 0.0
chip-tool debug unknown 5992 5992 0 0.0
FLASH 12845682 12848748 3066 0.0
RAM 582314 582442 128 0.0
chip-tool-ipv6only arm64 unknown 21312 21336 24 0.1
FLASH 10979696 10982288 2592 0.0
RAM 633232 633352 120 0.0
fabric-admin debug unknown 5816 5816 0 0.0
FLASH 11249747 11252813 3066 0.0
RAM 582690 582818 128 0.0
fabric-bridge-app debug unknown 4696 4696 0 0.0
FLASH 4508584 4509540 956 0.0
RAM 205536 205568 32 0.0
fabric-sync debug unknown 4936 4936 0 0.0
FLASH 5605301 5606309 1008 0.0
RAM 472536 472552 16 0.0
lighting-app debug+rpc+ui unknown 6104 6104 0 0.0
FLASH 5619729 5620657 928 0.0
RAM 228760 228760 0 0.0
lock-app debug unknown 5376 5376 0 0.0
FLASH 4732248 4733204 956 0.0
RAM 204744 204760 16 0.0
ota-provider-app debug unknown 4752 4752 0 0.0
FLASH 4358002 4358926 924 0.0
RAM 198416 198432 16 0.0
ota-requestor-app debug unknown 4688 4688 0 0.0
FLASH 4497042 4497966 924 0.0
RAM 203000 203016 16 0.0
shell debug unknown 4248 4248 0 0.0
FLASH 3028477 3029469 992 0.0
RAM 160456 160424 -32 -0.0
thermostat-no-ble arm64 unknown 9520 9536 16 0.2
FLASH 4102480 4103184 704 0.0
RAM 243040 243032 -8 -0.0
tv-app debug unknown 5704 5704 0 0.0
FLASH 5956293 5957269 976 0.0
RAM 596000 595984 -16 -0.0
tv-casting-app debug unknown 5288 5288 0 0.0
FLASH 11052605 11053757 1152 0.0
RAM 692120 692136 16 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 917380 917424 44 0.0
RAM 143292 143292 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 889868 889964 96 0.0
RAM 141479 141487 8 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 851548 851588 40 0.0
RAM 142200 142200 0 0.0
light-switch-app nrf52840dk_nrf52840 FLASH 794720 794744 24 0.0
RAM 132267 132267 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 939104 939156 52 0.0
RAM 130840 130848 8 0.0
lighting-app nrf52840dk_nrf52840+rpc FLASH 887104 887172 68 0.0
RAM 146685 146693 8 0.0
nrf52840dongle_nrf52840 FLASH 826776 826848 72 0.0
RAM 154547 154555 8 0.0
nrf5340dk_nrf5340_cpuapp FLASH 783184 783256 72 0.0
RAM 145695 145703 8 0.0
nrf7002dk_nrf5340_cpuapp FLASH 939104 939156 52 0.0
RAM 130840 130848 8 0.0
lock-app nrf52840dk_nrf52840 FLASH 809852 809872 20 0.0
RAM 132822 132822 0 0.0
nrf5340dk_nrf5340_cpuapp FLASH 735400 735424 24 0.0
RAM 132952 132952 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 955172 955216 44 0.0
RAM 131395 131403 8 0.0
pump-app nrf52840dk_nrf52840 FLASH 762816 762856 40 0.0
RAM 131613 131613 0 0.0
pump-controller-app nrf52840dk_nrf52840 FLASH 747956 747992 36 0.0
RAM 131372 131372 0 0.0
nxp contact k32w0+release FLASH 585264 585288 24 0.0
RAM 71072 71080 8 0.0
mcxw71+release FLASH 599800 599840 40 0.0
RAM 63168 63176 8 0.0
light k32w0+release FLASH 612204 612244 40 0.0
RAM 70464 70472 8 0.0
k32w1+release FLASH 686344 686400 56 0.0
RAM 48792 48808 16 0.0
lock mcxw71+release FLASH 762688 762728 40 0.0
RAM 70828 70844 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646068 1646156 88 0.0
RAM 212088 212104 16 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553836 1553924 88 0.0
RAM 208888 208904 16 0.0
light cy8ckit_062s2_43012 FLASH 1469108 1469196 88 0.0
RAM 200872 200880 8 0.0
lock cy8ckit_062s2_43012 FLASH 1466836 1466940 104 0.0
RAM 225232 225240 8 0.0
qpg lighting-app qpg6105+debug FLASH 663736 663832 96 0.0
RAM 105400 105424 24 0.0
lock-app qpg6105+debug FLASH 621572 621612 40 0.0
RAM 99860 99868 8 0.0
stm32 light STM32WB5MM-DK FLASH 484492 484536 44 0.0
RAM 144864 144880 16 0.0
telink bridge-app tlsr9258a FLASH 682594 682684 90 0.0
RAM 91200 91208 8 0.0
contact-sensor-app tlsr9528a_retention FLASH 623004 623088 84 0.0
RAM 31432 31440 8 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 764510 764600 90 0.0
RAM 50212 50220 8 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 710424 710514 90 0.0
RAM 73496 73504 8 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 627530 627620 90 0.0
RAM 142132 142140 8 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 813458 813548 90 0.0
RAM 99676 99684 8 0.0
tizen all-clusters-app arm unknown 4980 4988 8 0.2
FLASH 1731836 1732208 372 0.0
RAM 90724 90732 8 0.0
chip-tool-ubsan arm unknown 10792 10804 12 0.1
FLASH 1796559 17971070 5480 0.0
RAM 7838600 7840584 1984 0.0

@mergify mergify bot merged commit dad97c8 into project-chip:master Dec 5, 2024
69 checks passed
#include <app/codegen-data-model-provider/CodegenDataModelProvider.h>
#include <app/codegen-data-model-provider/Instance.h>

namespace chip {
namespace app {

DataModel::Provider * CodegenDataModelProviderInstance()
DataModel::Provider * CodegenDataModelProviderInstance(PersistentStorageDelegate * delegate)
Copy link
Contributor

Choose a reason for hiding this comment

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

Having this mutate the state of the data model provider on each get is really weird. Why are we doing that?

It seems like the fundamental issue is that we have this global getter at all, instead of just letting people who want a CodegenDataModelProvider instantiate a CodegenDataModelProvider.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could not come up with a saner "object is defined elsewhere" solution.
Technically this could be part of the constructor, but only if applications are responsible to allocate such an object.

Would accept any proposals to make this different.

Copy link
Contributor

Choose a reason for hiding this comment

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

but only if applications are responsible to allocate such an object.

Right. Why are we not doing that?

yyzhong-g pushed a commit to yyzhong-g/connectedhomeip that referenced this pull request Dec 12, 2024
…) and ember-specific (placed in codegen level) (project-chip#36658)

* Separate out logic between Safe and Ember storage persistence.

- keeps persistence and safe persistence as interfaces
- implementations are now Separate
- let server initialize the default safe persistence
- update codegen provider to initialize the ember side

* Some manual updates

* Scripted update

* Restyle

* Some manual updates again

* More manual updates. Only tests remain (and these are odd now ....)

* Update tests and support for nullptr, manual fix for one compilation

* Remove ember dependency from server

* Fix more typos for compilation

* Restyle

* Add a note about cadmin 1_19 being slow

* Fix up link to PR for persistence

* Restyled by prettier-markdown

* Mark one more slow test

* Add a few more dependencies to make esp32 link

* fix data model paths

* Fix qpg and nrf compile

* Fix a few more tests

* Restyled by clang-format

* Fix another typo for NRF compile

* Add persistence cpp files to darwin project

* Fix typo

* Drop timeouts for java tests: it is not reasonable to wait 360 minutes for a run to timeout, set individual tests to short

* Add back deleted line from before

* Restyled by clang-format

* Update src/app/DefaultSafeAttributePersistenceProvider.h

Co-authored-by: Andy Salisbury <[email protected]>

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andy Salisbury <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants