timing

11 views
Skip to first unread message

Giovanni Colapinto

unread,
Mar 26, 2016, 6:46:12 AM3/26/16
to API-Hour
Hi.

If I would like to measure the time used for every request, how can I do?

Thanks

Ludovic Gasc

unread,
Apr 4, 2016, 3:52:11 AM4/4/16
to Giovanni Colapinto, API-Hour
You can do that easily with:
start_time = container.loop.time()
At beginning of your request.

And at the end:
LOG.info('"%s" takes %s to take data', request, (container.loop.time()-start_time))

--
Ludovic Gasc (GMLudo)

--
You received this message because you are subscribed to the Google Groups "API-Hour" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-hour+u...@googlegroups.com.
To post to this group, send email to api-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/api-hour/4c741f60-3d66-4b03-90ae-e364d9f632d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giovanni Colapinto

unread,
Apr 13, 2016, 9:09:26 AM4/13/16
to API-Hour
Great, thanks!
Reply all
Reply to author
Forward
0 new messages