diff --git a/src/main/kotlin/org/wfanet/measurement/reporting/service/api/v2alpha/MetricsService.kt b/src/main/kotlin/org/wfanet/measurement/reporting/service/api/v2alpha/MetricsService.kt index 6a699e04cd5..ac9e0770a07 100644 --- a/src/main/kotlin/org/wfanet/measurement/reporting/service/api/v2alpha/MetricsService.kt +++ b/src/main/kotlin/org/wfanet/measurement/reporting/service/api/v2alpha/MetricsService.kt @@ -1015,6 +1015,10 @@ class MetricsService( return batchGetMetricsResponse { metrics += + /** + * TODO(@riemanli): a potential improvement can be done by only getting the metrics whose + * measurements are updated. Re-evaluate when a load-test is ready after deployment. + */ if (anyMeasurementUpdated) { batchGetInternalMetrics(principal.resourceKey.measurementConsumerId, externalMetricIds) .map { it.toMetric() } @@ -1084,8 +1088,13 @@ class MetricsService( principal, ) - // If any measurement got updated, pull the list of the up-to-date internal metrics. Otherwise, - // use the original list. + /** + * If any measurement got updated, pull the list of the up-to-date internal metrics. Otherwise, + * use the original list. + * + * TODO(@riemanli): a potential improvement can be done by only getting the metrics whose + * measurements are updated. Re-evaluate when a load-test is ready after deployment. + */ val internalMetrics: List = if (anyMeasurementUpdated) { batchGetInternalMetrics(