Update timings.

This commit is contained in:
Roz K 2022-12-17 14:14:11 +01:00
parent 56d76f30e2
commit f3bc6d6165
Signed by: roz
GPG Key ID: 51FBF4E483E1C822
2 changed files with 15 additions and 17 deletions

View File

@ -150,8 +150,8 @@ def main():
draw_avg = 0.0
perf_count = 0
try:
for x in range(10000):
current_time = time.monotonic() - start_time
for frame in range(10000):
current_time = 0 #time.monotonic() - start_time
begin_frame()
frame_begin = time.thread_time()
@ -219,15 +219,16 @@ def main():
frame_end = time.thread_time()
end_frame()
draw_ms = draw_end - draw_begin
draw_min = min(draw_min, draw_ms)
draw_max = max(draw_max, draw_ms)
draw_avg += draw_ms
frame_ms = frame_end - frame_begin
frame_min = min(frame_min, frame_ms)
frame_max = max(frame_max, frame_ms)
frame_avg += frame_ms
perf_count += 1
if frame > 0:
draw_ms = draw_end - draw_begin
draw_min = min(draw_min, draw_ms)
draw_max = max(draw_max, draw_ms)
draw_avg += draw_ms
frame_ms = frame_end - frame_begin
frame_min = min(frame_min, frame_ms)
frame_max = max(frame_max, frame_ms)
frame_avg += frame_ms
perf_count += 1
except KeyboardInterrupt:
pass
@ -246,9 +247,9 @@ def main():
# lookat = vec3((0.0, 500.0, -500.0))
# for x in range(10000)
# current_time = 0
# Draw * 10000 : min = 0.11 , max = 1.87 , avg = 0.16 ms
# Draw * 10000 : min = 0.11 , max = 1.75 , avg = 0.17 ms
# Draw * 10000 : min = 0.11 , max = 1.84 , avg = 0.17 ms
# Draw * 9999 : min = 0.18 , max = 1.98 , avg = 0.24 ms
# Draw * 9999 : min = 0.21 , max = 2.19 , avg = 0.27 ms
# Draw * 9999 : min = 0.19 , max = 2.13 , avg = 0.25 ms
print("Quitting...")
del tests_batch

View File

@ -1,3 +0,0 @@
#!/bin/sh
me=$(whoami)
exec sudo /bin/nice --adjustment=-20 su $me -c "exec python3 -O rk_island.py"