diff --git a/src/core/lv_refr.c b/src/core/lv_refr.c index 79af77884..ad47846af 100644 --- a/src/core/lv_refr.c +++ b/src/core/lv_refr.c @@ -380,7 +380,6 @@ void _lv_display_refr_timer(lv_timer_t * tmr) if(disp_refr->inv_p == 0) goto refr_finish; /*If refresh happened ...*/ - /*Call monitor cb if present*/ lv_display_send_event(disp_refr, LV_EVENT_RENDER_READY, NULL); if(!lv_display_is_double_buffered(disp_refr) || diff --git a/src/others/sysmon/lv_sysmon.c b/src/others/sysmon/lv_sysmon.c index d92dc6bed..078018a55 100644 --- a/src/others/sysmon/lv_sysmon.c +++ b/src/others/sysmon/lv_sysmon.c @@ -149,11 +149,13 @@ static void perf_update_timer_cb(lv_timer_t * t) info->calculated.cpu = 100 - lv_timer_get_idle(); info->calculated.refr_avg_time = info->measured.refr_cnt ? (info->measured.refr_elaps_sum / info->measured.refr_cnt) : 0; - info->calculated.render_avg_time = info->measured.render_cnt ? (info->measured.render_elaps_sum / - info->measured.render_cnt) : 0; info->calculated.flush_avg_time = info->measured.flush_cnt ? (info->measured.flush_elaps_sum / info->measured.flush_cnt) : 0; - info->calculated.render_real_avg_time = info->calculated.render_avg_time + info->calculated.flush_avg_time; + info->calculated.render_avg_time = info->measured.render_cnt ? (info->measured.render_elaps_sum / + info->measured.render_cnt) : 0; + + /*Flush time was measured in rendering time*/ + info->calculated.render_avg_time -= info->calculated.flush_avg_time; info->calculated.cpu_avg_total = ((info->calculated.cpu_avg_total * (info->calculated.run_cnt - 1)) + info->calculated.cpu) / info->calculated.run_cnt; @@ -190,7 +192,8 @@ static void perf_observer_cb(lv_observer_t * observer, lv_subject_t * subject) "%" LV_PRIu32" FPS, %" LV_PRIu32 "%% CPU\n" "%" LV_PRIu32" ms (%" LV_PRIu32" | %" LV_PRIu32")", perf->calculated.fps, perf->calculated.cpu, - perf->calculated.render_real_avg_time, perf->calculated.render_avg_time, perf->calculated.flush_avg_time + perf->calculated.render_avg_time + perf->calculated.flush_avg_time, + perf->calculated.render_avg_time, perf->calculated.flush_avg_time ); #endif /*LV_USE_PERF_MONITOR_LOG_MODE*/ } diff --git a/src/others/sysmon/lv_sysmon.h b/src/others/sysmon/lv_sysmon.h index 9016ddc16..bb4fb0b79 100644 --- a/src/others/sysmon/lv_sysmon.h +++ b/src/others/sysmon/lv_sysmon.h @@ -48,7 +48,7 @@ typedef struct { uint32_t refr_elaps_sum; uint32_t refr_cnt; uint32_t render_start; - uint32_t render_elaps_sum; + uint32_t render_elaps_sum; /*Contains the flush time too*/ uint32_t render_cnt; uint32_t flush_start; uint32_t flush_elaps_sum; @@ -59,9 +59,8 @@ typedef struct { uint32_t fps; uint32_t cpu; uint32_t refr_avg_time; - uint32_t render_avg_time; - uint32_t flush_avg_time; - uint32_t render_real_avg_time; + uint32_t render_avg_time; /**< Pure rendering time without flush time*/ + uint32_t flush_avg_time; /**< Pure flushing time without rendering time*/ uint32_t cpu_avg_total; uint32_t fps_avg_total; uint32_t run_cnt;