Python – how to measure speed

Measuring the speed of scripts.

An example of measuring the speed of work in Python:

import time
start_time = timetime()
user_ids = [x.id for x in db.session.query(User).distinct()]
print(user_ids)
print(“-% s seconds -“ % (timetime() – start_time))
exit()

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *