#Profiling convex functions?
4 messages · Page 1 of 1 (latest)
Hi @sinful breach. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, there are some tools and methods available for profiling Convex functions. Here's what the knowledge sources provide on this topic:
-
Console methods: Convex supports various console methods for debugging and profiling, including
console.time,console.timeLog, andconsole.timeEndfor measuring execution time. These are available in the default Convex runtime. -
Dashboard logs: You can view logs from your functions, including timing information, in the Convex dashboard. This allows you to spot check performance issues.
-
Health dashboard: The Health dashboard provides "invaluable information on how your app is performing in production, with deep insights on how your Convex queries are doing."
-
Functions dashboard: The Functions dashboard gives you stats on your functions, which can be useful for performance analysis.
-
Request ID tracking: Convex includes a Request ID in all exception messages, which you can use to find relevant logs for specific function executions. This can be helpful for tracking down performance issues in specific instances.
For more detailed profiling, you might want to set up log streaming to a dedicated observability platform. The Observability in Production article mentions that you can use platforms like Axiom or DataDog to create dashboards and extract metrics from your logs, which could be useful for more advanced profiling.