diff --git a/.github/workflows/bloat-check.yaml b/.github/workflows/bloat-check.yaml index eb4e725..82837cc 100644 --- a/.github/workflows/bloat-check.yaml +++ b/.github/workflows/bloat-check.yaml @@ -45,7 +45,7 @@ jobs: run: | python .github/scripts/memory/gh_report.py \ --verbose \ - --report-increases 0.2 \ + --report-increases 0.001 \ --report-pr \ --github-comment \ --github-limit-artifact-pages 50 \ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a59cc5f..d024ebf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,6 @@ jobs: - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} + if: ${{ !env.ACT && matrix.features == 'os' }} with: platform-name: cross-platform diff --git a/examples/light.rs b/examples/light.rs index 92844cd..a4c7ec2 100644 --- a/examples/light.rs +++ b/examples/light.rs @@ -35,7 +35,17 @@ use rs_matter_stack::wireless::WifiMatterStack; use static_cell::StaticCell; -const BUMP_SIZE: usize = 24000; +/// The amount of memory for allocating all `rs-matter-stack` futures created during +/// the execution of the `run*` methods. +/// This does NOT include the rest of the Matter stack. +/// +/// The futures of `rs-matter-stack` created during the execution of the `run*` methods +/// are allocated in a special way using a small bump allocator which results +/// in a much lower memory usage by those. +/// +/// If - for your platform - this size is not enough, increase it until +/// the program runs without panics during the stack initialization. +const BUMP_SIZE: usize = 23500; fn main() -> Result<(), Error> { env_logger::init_from_env( diff --git a/examples/light_eth.rs b/examples/light_eth.rs index 999c2ab..8a4064d 100644 --- a/examples/light_eth.rs +++ b/examples/light_eth.rs @@ -12,7 +12,6 @@ use core::pin::pin; -use env_logger::Target; use log::info; use rs_matter::dm::clusters::on_off::test::TestOnOffDeviceLogic; @@ -34,14 +33,22 @@ use rs_matter_stack::persist::DirKvBlobStore; use static_cell::StaticCell; -const BUMP_SIZE: usize = 20000; +/// The amount of memory for allocating all `rs-matter-stack` futures created during +/// the execution of the `run*` methods. +/// This does NOT include the rest of the Matter stack. +/// +/// The futures of `rs-matter-stack` created during the execution of the `run*` methods +/// are allocated in a special way using a small bump allocator which results +/// in a much lower memory usage by those. +/// +/// If - for your platform - this size is not enough, increase it until +/// the program runs without panics during the stack initialization. +const BUMP_SIZE: usize = 40000; //20000; fn main() -> Result<(), Error> { - env_logger::Builder::from_env( + env_logger::init_from_env( env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), - ) - .target(Target::Stdout) - .init(); + ); info!("Starting...");