"benchmark" : benchmark["benchmarks"],
"results" : cbt_results.get("results", None),
}
- response = requests.post(self.endpoint_url, json=data, headers=self.headers, auth=self.auth)
- if response.status_code == 201:
- self.log.info("Data inserted successfully.")
- ctx.summary['cbt_perf_url'] = self.create_cbt_perf_url(ctx, config)
- else:
- self.log.info(f"Error inserting data: {response}")
+
+ try:
+ response = requests.post(self.endpoint_url, json=data, headers=self.headers, auth=self.auth, timeout=10)
+ if response.status_code == 201:
+ self.log.info("Data inserted successfully.")
+ ctx.summary['cbt_perf_url'] = self.create_cbt_perf_url(ctx, config)
+ else:
+ self.log.info(f"Error inserting data: {response}")
+ except requests.exceptions.RequestException as e:
+ self.log.warning(f"Could not send performance data to {self.endpoint_url}: {e}")
+ self.log.warning("Continuing without performance data collection")
+ return
def read_results(self, ctx, config):