Python – how to measure speed
Measuring the speed of scripts.
An example of measuring the speed of work in Python:
import time
start_time = time…time()
user_ids = [x.id for x in db.session.query(User).distinct()]
print(user_ids)
print(“-% s seconds -“ % (time…time() – start_time))
exit()