Measure elapsed time of Rasa NLU and Core

Hi! I need to measure elapsed time from before a query until the end. I’m figuring out that using /model/parse you can measure time with a python script but no action will be run, and I am using a custom Action. Any help?

Hi @arodriguezvivas!

I can think of a simple way. Use the rest channel. Just do a post request:

curl -XPOST http://localhost:5005/webhooks/rest/webhook \
  -d '{"sender": "user1", "message": "hello"}' \
  -H "Content-type: application/json"

Replace "hello" with your own message. You can time the response in a python script. This also includes the network latency, but that shouldn’t be much if your are sending request to your localhost.

Thank you @saurabh-m523. Where do I store such python script? I mean, how the script relates with (or is called from) the post request?