@Marvin Is there a way to pull the average duration of a deployment from the prefect cloud api?
m
Marvin
09/11/2024, 4:41 AM
You want to retrieve the average duration of a deployment from the Prefect Cloud API. Let's find out how to do this.
First, I need to know which major version of Prefect you are using (2.x or 3.x). Could you please specify that?
a
ajones
09/11/2024, 4:41 AM
@Marvin 3
m
Marvin
09/11/2024, 4:41 AM
I couldn't find direct information on retrieving the average duration of a deployment. I'll now check any related Github issues to see if this has been discussed. Hang on!
I couldn't find specific information on retrieving the average deployment duration from either the Prefect docs or GitHub issues.
You might need to calculate the average duration manually by fetching deployment run data through the Prefect API and computing the average locally. For this:
1. Obtain all deployment runs and their durations using the Prefect API.
2. Calculate the average duration from the retrieved data.
For detailed API usage, refer to the Prefect 3.x API documentation. If you face specific issues while implementing this, feel free to ask!
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.