erquhart
erquhart•16mo ago

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
erquhart
erquhartOP•16mo ago
I would normally just place console logs and eyeball the timing of the output, but convex outputs all logs at once after completion
Indy
Indy•16mo ago
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.
lee
lee•16mo ago
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 🙂
erquhart
erquhartOP•16mo ago
Gotcha, makes sense. Glad to hear this is on the list!

Did you find this page helpful?