What's needed?
We need benchmarks for the data sourcing actor, where we see how long
it takes to stream a certain number of values for a certain number of
microgrid components.
Proposed solution
Prereqs:
-
The MockMicrogrid package in tests currently sends out 2000
values per component_id. This needs to be configurable.
-
The start method starts the data sourcing actor and the
resampling actor, but sends out the channel only for the resampling
actor. There should ideally be a start_mock_client method that
just sets up the mock client, which the start method calls. Then
we would be able just call start_mock_client and then create our
own actor instances.
The data sourcing actor can be benchmarked by a function that takes as
input:
- number of components
- the number of messages to be sent out for each battery as inputs
This benchmarking function can be implemented like this:
- Create a
MockMicrogrid instance, with the given number of ev
chargers like here.
- the
MockMicrogrid has a default sample_rate_s of 0.01, this can
be set to 0.0 (or almost 0.0 if there are synchronization issues).
- Create a
DataSourcingActor instance, and send requests to it for
each of the 3 current phases,
for all component ids in MockMicrogrid.evc_ids. Collect the
corresponding receivers into a channels.MergeNamed and count the
number of messages received from each component_id+metrid_id pair.
- Confirm the number of messages sent is the number of messages
received. Measure the time required to stream the configured
number of messages.
Use cases
No response
Alternatives and workarounds
No response
Additional context
No response
What's needed?
We need benchmarks for the data sourcing actor, where we see how long
it takes to stream a certain number of values for a certain number of
microgrid components.
Proposed solution
Prereqs:
The
MockMicrogridpackage in tests currently sends out 2000values per component_id. This needs to be configurable.
The
startmethod starts the data sourcing actor and theresampling actor, but sends out the channel only for the resampling
actor. There should ideally be a
start_mock_clientmethod thatjust sets up the mock client, which the
startmethod calls. Thenwe would be able just call
start_mock_clientand then create ourown actor instances.
The data sourcing actor can be benchmarked by a function that takes as
input:
This benchmarking function can be implemented like this:
MockMicrogridinstance, with the given number of evchargers like here.
MockMicrogridhas a defaultsample_rate_sof 0.01, this canbe set to 0.0 (or almost 0.0 if there are synchronization issues).
DataSourcingActorinstance, and send requests to it foreach of the 3 current phases,
for all component ids in
MockMicrogrid.evc_ids. Collect thecorresponding receivers into a
channels.MergeNamedand count thenumber of messages received from each component_id+metrid_id pair.
received. Measure the time required to stream the configured
number of messages.
Use cases
No response
Alternatives and workarounds
No response
Additional context
No response