Prefect does not provide built-in analytics for calculating metrics like p95 or p50 durations directly from tasks and flows. However, Prefect does offer some basic metrics such as the duration of flow runs. You would likely need to implement custom analytics using Prefect's API to achieve more detailed insights like p95 and p50 durations.
Here's a brief overview of what you can do:
- Use Prefect's API to retrieve flow and task run data.
- Calculate the desired metrics (p95, p50) using this data in your own analytics tool or script.
For more about flow and task metrics, you can refer to Prefect's documentation on
custom triggers and metrics.
If you decide to create a custom solution, you can start by exploring Prefect's client API to fetch task and flow run data programmatically. You can find relevant functions like
get_client
in the Prefect API tree.
If you have any more specific questions or need further assistance on how to implement this, feel free to ask!