I've got an asynchronous request handler and I would like to know how many times my handler has relinquished execution to the ioloop, including nested coroutines it may have called (either in my code or in 3rd party libraries).
This will help me tweak my application and get better latencies over all the endpoints.
Note that since recent tornado uses asyncio, a solution that works with just asyncio would be satisfactory.