Commit 6c6f9ee
committed
Change BatteryPool to send metrics only when they change
We compared the metrics result but we included timestamp.
Because timestamps were different comparison was always True.
Change tells that timestamp should not be included in comparison
methods.
Remove Sample from the metric result types, because we don't
return any Sample metrics and it is not consistent with the rest
the result types, now.
Signed-off-by: ela-kotulska-frequenz <[email protected]>1 parent cddf2e3 commit 6c6f9ee
File tree
3 files changed
+22
-20
lines changed- src/frequenz/sdk/timeseries/battery_pool
- tests/timeseries/_battery_pool
3 files changed
+22
-20
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
| 61 | + | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
| 512 | + | |
518 | 513 | | |
519 | 514 | | |
520 | 515 | | |
| |||
601 | 596 | | |
602 | 597 | | |
603 | 598 | | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 599 | + | |
610 | 600 | | |
611 | 601 | | |
612 | 602 | | |
| |||
631 | 621 | | |
632 | 622 | | |
633 | 623 | | |
| 624 | + | |
634 | 625 | | |
635 | 626 | | |
636 | 627 | | |
637 | | - | |
| 628 | + | |
| 629 | + | |
638 | 630 | | |
639 | 631 | | |
640 | 632 | | |
| |||
788 | 780 | | |
789 | 781 | | |
790 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
791 | 791 | | |
792 | 792 | | |
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
797 | | - | |
| 797 | + | |
798 | 798 | | |
799 | 799 | | |
800 | 800 | | |
| |||
0 commit comments