Created
May 8, 2022 16:14
-
-
Save GiorgioSgl/b9a32d1e319422982f638615fad9fb70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from statistics import mean | |
test_times = 100 # number of time will be tested | |
def debug_time(func): | |
times_list = [] | |
for _ in range(test_times): | |
start_time = time.process_time() | |
func() | |
end_time = time.process_time() | |
times_list.append(end_time-start_time) | |
avg_time = mean(times_list) | |
return avg_time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment