all repos — tint2 @ cbde035f368b22e84c98bd100e9ed901849e688b

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Add FPS profiling (set DEBUG_FPS when running tint2) : show average
o9000 mrovi9000@gmail.com
commit

cbde035f368b22e84c98bd100e9ed901849e688b

parent

0f3f6eebd8aff0f18364fc1d984704b8a54015ab

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M src/tint.csrc/tint.c

@@ -1567,6 +1567,7 @@ double ts_event_read = 0;

double ts_event_processed = 0; double ts_render_finished = 0; double ts_flush_finished = 0; + double fps_sum = 0, fps_count = 0; while (1) { if (panel_refresh) { if (debug_fps)

@@ -1654,9 +1655,12 @@ double fps = 1.0 / period;

double proc_ratio = (ts_event_processed - ts_event_read) / period; double render_ratio = (ts_render_finished - ts_event_processed) / period; double flush_ratio = (ts_flush_finished - ts_render_finished) / period; + fps_sum += fps; + fps_count += 1; fprintf(stderr, - BLUE "fps = %.1f : processing %.1f%%, rendering %.1f%%, flushing %.1f%%" RESET "\n", + BLUE "fps = %.1f (avg %.1f) : processing %.1f%%, rendering %.1f%%, flushing %.1f%%" RESET "\n", fps, + fps_sum / fps_count, proc_ratio * 100, render_ratio * 100, flush_ratio * 100);