diff --git a/tests/canary/scripts/push_stats_to_cloudwatch.py b/tests/canary/scripts/push_stats_to_cloudwatch.py index 3d102db12..8130cbfe2 100644 --- a/tests/canary/scripts/push_stats_to_cloudwatch.py +++ b/tests/canary/scripts/push_stats_to_cloudwatch.py @@ -14,12 +14,10 @@ def readXML_and_publish_metrics_to_cw(): failures = testsuite.attrib["failures"] tests = testsuite.attrib["tests"] successes = int(tests) - int(failures) - success_rate = successes/int(tests)*100 else: failures = 0 successes = 0 - tests = 0 - success_rate = 0 + tests = 1 timestamp = datetime.now().strftime("%Y-%m-%dT%H:%M:%S") @@ -60,15 +58,6 @@ def readXML_and_publish_metrics_to_cw(): "Value": int(successes), "Unit": "Count", }, - { - "MetricName": "success_rate", - "Timestamp": timestamp, - "Dimensions": [ - {"Name": "CodeBuild Project Name", "Value": project_name}, - ], - "Value": int(success_rate), - "Unit": "Percent", - }, ] # Use the put_metric_data method to push the metric data to CloudWatch