Skip to content

Conversation

@shsms
Copy link
Contributor

@shsms shsms commented Jul 2, 2024

Instead, this PR makes the power distribution results available directly from the *Pools.

This should go some way towards reducing the frequency of Report objects as reported in #818

@shsms shsms requested a review from a team as a code owner July 2, 2024 14:19
@shsms shsms requested a review from llucax July 2, 2024 14:19
@github-actions github-actions bot added part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) part:data-pipeline Affects the data pipeline part:actor Affects an actor ot the actors utilities (decorator, etc.) part:core Affects the SDK core components (data structures, etc.) part:microgrid Affects the interactions with the microgrid labels Jul 2, 2024
@shsms shsms marked this pull request as draft July 2, 2024 14:22
@shsms
Copy link
Contributor Author

shsms commented Jul 2, 2024

Draft until channel release with filter on receivers.

@shsms shsms force-pushed the separate-power-dist-results branch 2 times, most recently from a6a50ca to 09e286e Compare July 8, 2024 09:52
@github-actions github-actions bot added the part:docs Affects the documentation label Jul 8, 2024
@shsms
Copy link
Contributor Author

shsms commented Jul 8, 2024

Based on #1000.

shsms added 2 commits July 9, 2024 14:47
This is to be able to use the `filter` feature on `Receiver`s that was
added in v1.1.0.

Signed-off-by: Sahas Subramanian <[email protected]>
This can be used in the BatteryPool that users can use to get a direct
stream of the power distributor results.

Signed-off-by: Sahas Subramanian <[email protected]>
@shsms shsms force-pushed the separate-power-dist-results branch from 09e286e to 0927cb9 Compare July 9, 2024 12:50
@shsms shsms marked this pull request as ready for review July 9, 2024 13:25
@shsms
Copy link
Contributor Author

shsms commented Jul 9, 2024

This is now ready. ReceiverFetcherWith is internal, but still could use a better name I think, if anyone has any ideas.

@llucax
Copy link
Contributor

llucax commented Jul 11, 2024

This is now ready. ReceiverFetcherWith is internal, but still could use a better name I think, if anyone has any ideas.

Who doesn't like to get involved in a nice and long name discussion? 😆

Copy link
Contributor

@llucax llucax left a comment

Choose a reason for hiding this comment

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

Just a few small comments.

@shsms shsms force-pushed the separate-power-dist-results branch from 9423ee9 to 21ef039 Compare July 11, 2024 11:58
shsms added 6 commits July 11, 2024 13:59
This is a `ReceiverFetcher` which can be used to modify newly created
receivers, for example by applying a `map` or a `filter` on them,
before returning them.

Signed-off-by: Sahas Subramanian <[email protected]>
This would stream results only for the batteries that are part of the
pool.

Signed-off-by: Sahas Subramanian <[email protected]>
And replace them with the separate distribution result stream from
`*Pool`s, like
`battery_pool.power_distribution_results.new_receiver()` for battery
pools.

The `distribution_result` field from the `Report` classes would be
removed in subsequent commits.

Signed-off-by: Sahas Subramanian <[email protected]>
This should reduce the number of `Report`s sent out by the
PowerManager.

Signed-off-by: Sahas Subramanian <[email protected]>
Signed-off-by: Sahas Subramanian <[email protected]>
@shsms shsms force-pushed the separate-power-dist-results branch from 21ef039 to f0128f0 Compare July 11, 2024 12:00
@shsms shsms added this pull request to the merge queue Jul 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 12, 2024
@shsms shsms added this pull request to the merge queue Jul 15, 2024
Merged via the queue into frequenz-floss:v1.x.x with commit a6bc362 Jul 15, 2024
@shsms shsms deleted the separate-power-dist-results branch July 15, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:actor Affects an actor ot the actors utilities (decorator, etc.) part:core Affects the SDK core components (data structures, etc.) part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:microgrid Affects the interactions with the microgrid part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

Development

Successfully merging this pull request may close these issues.

2 participants