Skip to content

Commit 38f2c8c

Browse files
Update metric info (#39)
Add information to `energy` metric to inform users about drawbacks of this metric.
2 parents 8552b82 + dba7a78 commit 38f2c8c

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## New Features
1212

13-
<!-- Here goes the main new features and examples or instructions on how to use them -->
13+
* Additional information for energy metric
1414

1515
## Bug Fixes
1616

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)