https://prefect.io logo
#prefect-community
Title
# prefect-community
j

John-Craig Borman

06/14/2022, 2:48 PM
Hi all, are there any utilities to determine how many tasks were charged for a given flow run? (Using Prefect Cloud)
k

Kevin Kho

06/14/2022, 2:49 PM
Not exactly. We don’t have these kind of tools, but I think if you have questions on billing, sales could help with that more at
<mailto:sales@prefect.io|sales@prefect.io>
j

John-Craig Borman

06/14/2022, 2:53 PM
Hey @Kevin Kho, thanks for the quick response. (a) would a utility for this be viable? (b) would sales be able to breakdown costs or task usage per flow?
k

Kevin Kho

06/14/2022, 2:59 PM
I don’t know if they can on an individual Flow. The utility for a full tenant billing is on the backlog because some users who migrate from Server to Cloud want a cost estimate, but it hasn’t been a high priority ticket. On the individual Flow, you could have a script that counts the number of successful tasks and then filters the ones with duration above 1 second.
j

John-Craig Borman

06/14/2022, 4:18 PM
Ok, good to know - thanks!
k

Kevin Kho

06/15/2022, 2:35 AM
I gave this a shot. It’s a bit tricky. How many tasks are you expecting on that Flow? I’m guessing you’re asking because there are a lot of tasks right?
j

John-Craig Borman

06/28/2022, 5:14 PM
Not that many tasks actually, it's rather the number of flows runs. I ended up writing some utility functions to query all task runs matching a flow run name pattern and subset that to determine the #/% of tasks charged. The context here is that I'm trying to estimate the task usage + flow efficiency for backfilling X years of data
Would save time to have an official utility to achieve this, but a little GraphQL magic is all it takes
k

Kevin Kho

06/28/2022, 5:55 PM
Ah I see what you mean. I think we’re not focused on exposing such a utility at the moment because the focus is on 2.0 and the billing model there will be different
👍 1
4 Views