Measuring execution time within convex functions
I'm troubleshooting performance of some of my queries, and I'd like to be able to measure execution of specific functions within the query. Is that possible in the convex environment?
4 Replies
I would normally just place console logs and eyeball the timing of the output, but convex outputs all logs at once after completion
Yep this is definitely a missing feature right now. I don't think there are great workarounds.
I would probably try putting just the small part in a new query and try to measure around it in an action. But it's probably not a great answer because you are now dealing with more syscalls/traps in the system.
I wonder if @lee has better ideas.
This is high on my list to prioritize for the next cycle of work.
Breaking up the query was going to be my suggestion (although you can look at latency in the dashboard; doesn't have to be from an action). I agree we can make this better, and we will 🙂
Gotcha, makes sense. Glad to hear this is on the list!