#Profiling convex functions?

4 messages · Page 1 of 1 (latest)

sinful breach
#

Is there any tooling or documentation around the best way to profile convex functions?

rigid tapirBOT
#

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:

  1. Console methods: Convex supports various console methods for debugging and profiling, including console.time, console.timeLog, and console.timeEnd for measuring execution time. These are available in the default Convex runtime.

  2. Dashboard logs: You can view logs from your functions, including timing information, in the Convex dashboard. This allows you to spot check performance issues.

  3. 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."

  4. Functions dashboard: The Functions dashboard gives you stats on your functions, which can be useful for performance analysis.

  5. 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.

#

While these tools provide ways to measure and analyze function performance, the knowledge sources don't mention any Convex-specific profiling tools. If you need more advanced profiling capabilities, you might want to reach out to the Convex support team for further guidance.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: