From 56ed2312c7beb05235d9ef0b0b14cf3eb1857fe7 Mon Sep 17 00:00:00 2001 From: Tiyash Basu Date: Fri, 22 Mar 2024 17:57:37 +0100 Subject: [PATCH] Rename `SimpleMetricSample` to `SimpleMetricValue` In out terminology, we refer to a "sample" as a data structure that stores a value alongside a timestamp. Since the message `SimpleMetricSample` does not contain timestamps, it needs to be renamed. Signed-off-by: Tiyash Basu --- RELEASE_NOTES.md | 3 +++ proto/frequenz/api/common/v1/metrics/metric_sample.proto | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 21264538..812c6ea3 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -30,6 +30,9 @@ `METRIC_AC_THD_CURRENT` -> `METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT` `METRIC_AC_THD_CURRENT_PHASE_[1|2|3]` -> `METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_[1|2|3]` +- Renamed `SimpleMetricSample` to `SimpleMetricValue`, because it does not + contain a timestamp, so it does not represent a sample but a value. + ## New Features - Added a `Frequenz.api.common.v1.types.Decimal` type, compatible with diff --git a/proto/frequenz/api/common/v1/metrics/metric_sample.proto b/proto/frequenz/api/common/v1/metrics/metric_sample.proto index 553a0a2a..ebb040bd 100644 --- a/proto/frequenz/api/common/v1/metrics/metric_sample.proto +++ b/proto/frequenz/api/common/v1/metrics/metric_sample.proto @@ -16,7 +16,7 @@ import "google/protobuf/timestamp.proto"; // Represents a single sample of a specific metric, the value of which is either // measured or derived at a particular time. -message SimpleMetricSample { +message SimpleMetricValue { // The value of the metric, which could be either measured or derived. float value = 2; } @@ -46,18 +46,18 @@ message AggregatedMetricSample { } // MetricSampleVariant serves as a union type that can encapsulate either a -// `SimpleMetricSample` or an `AggregatedMetricSample`. +// `SimpleMetricValue` or an `AggregatedMetricSample`. // // This message is designed to offer flexibility in capturing different // granularities of metric samples—either a simple single-point measurement // or an aggregated set of measurements for a metric. // -// A `MetricSampleVariant` can hold either a `SimpleMetricSample` or an +// A `MetricSampleVariant` can hold either a `SimpleMetricValue` or an // `AggregatedMetricSample`, but not both simultaneously. Setting one will // nullify the other. message MetricSampleVariant { oneof metric_sample_type { - SimpleMetricSample simple_metric = 1; + SimpleMetricValue simple_metric = 1; AggregatedMetricSample aggregated_metric = 2; } }