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 jimmylai
Recipients jimmylai, vstinner, yselivanov
Date 2017-09-05.17:36:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504632981.12.0.975741924634.issue31350@psf.upfronthosting.co.za>
In-reply-to
Content
Benchmark script: Run 10 times to get mean and stdev


import asyncio
import time

async def async_get_loop():
    start_time = time.time()
    for _ in range(5000000):
        asyncio.get_event_loop()
    return time.time() - start_time

loop = asyncio.get_event_loop()
results = []
for _ in range(10):
    start_time = time.time()
    result = loop.run_until_complete(async_get_loop())
    results.append(result)

import statistics
print("elapse time: %.3lf +- %.3lf secs" % (statistics.mean(results), statistics.stdev(results)))
History
Date User Action Args
2017-09-05 17:36:21jimmylaisetrecipients: + jimmylai, vstinner, yselivanov
2017-09-05 17:36:21jimmylaisetmessageid: <1504632981.12.0.975741924634.issue31350@psf.upfronthosting.co.za>
2017-09-05 17:36:21jimmylailinkissue31350 messages
2017-09-05 17:36:21jimmylaicreate