perf: add basic measurements

This commit is contained in:
Lephenixnoir 2022-08-20 15:18:14 +02:00
parent 12721e6021
commit e69c51268a
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 8 additions and 1 deletions

View File

@ -37,6 +37,7 @@ int main(void)
#include <math.h>
int main(void)
{
prof_init();
azrp_config_scale(1);
azrp_shader_clear_configure();
/* azrp_shader_image_rgb16_configure();
@ -58,12 +59,18 @@ int main(void)
int y2 = (int)(90 * sin(t + 1.05)) + 100;
int y3 = (int)(90 * sin(t + 2.05)) + 100;
azrp_perf_clear();
azrp_clear(C_WHITE);
azrp_triangle(10, y1, 128, y2, 380, y3, C_RED);
azrp_update();
drect(0, DHEIGHT-20, DWIDTH-1, DHEIGHT-1, C_WHITE);
dprint(1, 210, C_BLACK, "Hello, World!");
dprint(1, 210, C_BLACK, "cmdgen:%03dus sort:%03dus render:%4d+%4dus",
prof_time(azrp_perf_cmdgen),
prof_time(azrp_perf_sort),
prof_time(azrp_perf_render) - prof_time(azrp_perf_r61524),
prof_time(azrp_perf_r61524));
r61524_display(gint_vram, DHEIGHT-20, 20, R61524_DMA_WAIT);
//---