This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients asvetlov, yselivanov
Date 2018-04-03.22:33:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522794802.06.0.467229070634.issue33221@psf.upfronthosting.co.za>
In-reply-to
Content
I suggest adding a `Task.stats()` method.
The method should return a dict with the task usage statistics.
Dict keys:
- total_time: a time between task creation and a moment of the call (or task finishing timestamp if the task has finished). The value includes a time for `await func()` waiting.
- real_time: a cumulative time for `Task._step()` executions
- switch_count: a count of `Task._step()` calls.

It can help with tasks activity analyzing.

Yuri, what do you think about?
History
Date User Action Args
2018-04-03 22:33:22asvetlovsetrecipients: + asvetlov, yselivanov
2018-04-03 22:33:22asvetlovsetmessageid: <1522794802.06.0.467229070634.issue33221@psf.upfronthosting.co.za>
2018-04-03 22:33:21asvetlovlinkissue33221 messages
2018-04-03 22:33:21asvetlovcreate