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!