diff options
author | Bad Diode <bd@badd10de.dev> | 2023-08-30 11:40:36 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-08-30 11:40:36 +0200 |
commit | 81462f66b843b138240e7c6252c434d24a085afd (patch) | |
tree | 12e78aaad95ef2a3fa1f63162209df5355a1f148 /src/profiling.c | |
parent | 0845bb5aaa1a463c2d35ae6df5a3457441b767b5 (diff) | |
download | uxngba-81462f66b843b138240e7c6252c434d24a085afd.tar.gz uxngba-81462f66b843b138240e7c6252c434d24a085afd.zip |
Prepare for initial eval timing benchmark
Diffstat (limited to 'src/profiling.c')
-rw-r--r-- | src/profiling.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/profiling.c b/src/profiling.c index 2d230df..9817eb1 100644 --- a/src/profiling.c +++ b/src/profiling.c | |||
@@ -39,29 +39,7 @@ | |||
39 | #define PROF_SHOW() \ | 39 | #define PROF_SHOW() \ |
40 | do { \ | 40 | do { \ |
41 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ | 41 | txt_position((PROF_SHOW_X), (PROF_SHOW_Y));\ |
42 | txt_printf("INPUT %.8lu\n", avg_input_cycles);\ | 42 | txt_printf("N CYCLES: %.8lu\n", eval_cycles);\ |
43 | txt_printf("EVAL %.8lu\n", avg_eval_cycles);\ | ||
44 | txt_printf("VIDEO\n");\ | ||
45 | txt_printf(">PIX %.8lu\n", avg_ppu_pixel_cycles);\ | ||
46 | txt_printf(">FILL %.8lu\n", avg_ppu_fill_cycles);\ | ||
47 | txt_printf(">1BPP %.8lu\n", avg_ppu_icn_cycles);\ | ||
48 | txt_printf(">2BPP %.8lu\n", avg_ppu_chr_cycles);\ | ||
49 | txt_printf(">FLIP %.8lu\n", avg_flip_cycles);\ | ||
50 | txt_printf("AUDIO %.8lu\n", avg_mix_cycles);\ | ||
51 | txt_printf("TOTAL %.8lu\n", avg_frame_cycles);\ | ||
52 | u32 frame_time =\ | ||
53 | FP_DIV(\ | ||
54 | FP_NUM(avg_frame_cycles + 1, 2),\ | ||
55 | FP_NUM(2809, 2),\ | ||
56 | 2) * 166;\ | ||
57 | u32 fps =\ | ||
58 | FP_DIV(\ | ||
59 | FP_NUM(280896 * 60, 2),\ | ||
60 | FP_NUM(avg_frame_cycles + 1, 2),\ | ||
61 | 2);\ | ||
62 | txt_printf("TIME %.8lu\n", frame_time >> 2);\ | ||
63 | txt_printf("FPS %.8lu\n", (fps >> 2) + 1);\ | ||
64 | screen_fill(BG_BACK, 0, 0, 8 * 16, 8 * 12, 2);\ | ||
65 | } while (0) | 43 | } while (0) |
66 | 44 | ||
67 | static u32 prof_frame_counter = 0; | 45 | static u32 prof_frame_counter = 0; |