Skip to content

Commit e9a348e

Browse files
Add additional info to inform energy metric users
Signed-off-by: Flora <[email protected]>
1 parent 0d6e0eb commit e9a348e

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

RELEASE_NOTES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,24 @@
66

77
## Upgrading
88

9+
<<<<<<< HEAD
910
* Upgrading metric `__init__` to names from api-common release [v0.6.0](https://github.com/frequenz-floss/frequenz-api-common/releases/tag/v0.6.0)
1011

1112
## New Features
1213

1314
<!-- Here goes the main new features and examples or instructions on how to use them -->
15+
=======
16+
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
17+
18+
## New Features
19+
20+
* Additional information for energy metric
21+
>>>>>>> fd64a93 (Add additional info to inform energy metric users)
1422
1523
## Bug Fixes
1624

1725
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
26+
<<<<<<< HEAD
27+
=======
28+
29+
>>>>>>> fd64a93 (Add additional info to inform energy metric users)

src/frequenz/client/common/metric/__init__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,18 @@
1313

1414

1515
class Metric(Enum):
16-
"""List of supported metrics."""
16+
"""List of supported metrics.
17+
18+
AC energy metrics information:
19+
* This energy metric is reported directly from the component, and not a
20+
result of aggregations in our systems. If a component does not have this
21+
metric, this field cannot be populated.
22+
* Components that provide energy metrics reset this metric from time to
23+
time. This behaviour is specific to each component model. E.g., some
24+
components reset it on UTC 00:00:00.
25+
* This energy metric does not specify the timestamp since when the energy
26+
was being accumulated, and therefore can be inconsistent.
27+
"""
1728

1829
# Default value
1930
UNSPECIFIED = PBMetric.METRIC_UNSPECIFIED
@@ -57,7 +68,7 @@ class Metric(Enum):
5768
AC_POWER_FACTOR_PHASE_2 = PBMetric.METRIC_AC_POWER_FACTOR_PHASE_2
5869
AC_POWER_FACTOR_PHASE_3 = PBMetric.METRIC_AC_POWER_FACTOR_PHASE_3
5970

60-
# AC energy metrics
71+
# AC energy metrics - Please be careful when using and check Enum docs
6172
AC_APPARENT_ENERGY = PBMetric.METRIC_AC_APPARENT_ENERGY
6273
AC_APPARENT_ENERGY_PHASE_1 = PBMetric.METRIC_AC_APPARENT_ENERGY_PHASE_1
6374
AC_APPARENT_ENERGY_PHASE_2 = PBMetric.METRIC_AC_APPARENT_ENERGY_PHASE_2

0 commit comments

Comments
 (0)