Commit 3513f90
committed
Calculate the input sampling period
The input sampling period is calculated by counting the total received
samples, and dividing the total resampling time until the internal
buffer is full by the total received samples.
To store all the source properties (sampling period, sampling start,
total received samples) a new class is used (SourceProperties) and this
information is passed to the resampling function, so it can have more
information about the source to perform a proper resampling.
This calculation is performed once and then remains constant, but at
some point we could add a timer to re-calculate it.
This also improves slightly the documentation and validation of the
ResamplingConfig class.
The add_timeseries() methods now also takes a name as a way to identify
different sources in log messages (the actor uses the channel name as
timeseries name).
Signed-off-by: Leandro Lucarella <[email protected]>1 parent 34a1dd5 commit 3513f90
File tree
5 files changed
+293
-82
lines changed- benchmarks/timeseries
- examples
- src/frequenz/sdk
- actor
- timeseries
- tests/timeseries
5 files changed
+293
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | 23 | | |
18 | 24 | | |
| |||
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| 30 | + | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
0 commit comments