2 odpowiedzi
+ 3
import time
start = time.perf_counter() # or time.perf_counter_ns()
put you code/script
in here
blah blah blah
blah blah blah
end = time.perf_counter() # or time.perf_counter_ns()
print(end - start)
+ 1
Using timeit module.
Please refer below link.
https://www.guru99.com/timeit-JUMP_LINK__&&__python__&&__JUMP_LINK-examples.html#:~:text=timeit()%20method%20is%20available,the%20performance%20of%20the%20code.