CloudWatch - End times for aggregations should be exclusive (#5627)

This commit is contained in:
Christian Kjær Larsen 2022-11-01 17:50:51 +01:00 committed by GitHub
parent 78bf4a82d5
commit bcb6399a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,7 +500,7 @@ class CloudWatchBackend(BaseBackend):
) -> List[Dict[str, Any]]:
period_data = [
md for md in self.metric_data if start_time <= md.timestamp <= end_time
md for md in self.metric_data if start_time <= md.timestamp < end_time
]
results = []
@ -582,7 +582,7 @@ class CloudWatchBackend(BaseBackend):
for md in self.get_all_metrics()
if md.namespace == namespace
and md.name == metric_name
and start_time <= md.timestamp <= end_time
and start_time <= md.timestamp < end_time
]
if unit: