From: Carl Worth Date: Sun, 10 Nov 2013 02:47:10 +0000 (-0800) Subject: Add placeholder value for GPU load. X-Git-Url: https://git.cworth.org/git?p=fips;a=commitdiff_plain;h=b4a04889d2e986757c4879971cb0003e2bafe379 Add placeholder value for GPU load. We're not measuring GPU load yet, but it's helpful to print this as we are starting to write the viewer program that will parse this data. --- diff --git a/metrics.c b/metrics.c index 0c61e0e..e376186 100644 --- a/metrics.c +++ b/metrics.c @@ -829,7 +829,7 @@ metrics_end_frame_pre_swap (metrics_t *metrics) if (frames == 0) { /* Print header */ - printf ("# frame: Frame_Number Frame_Time_milliseconds Frame_latency_milliseconds CPU_load\n"); + printf ("# frame: Frame_Number Frame_Time_milliseconds Frame_latency_milliseconds CPU_load GPU_load\n"); } else { /* Subtract previous frame's times to get frame times. */ frame_time_ns = swap_end_timestamp - metrics->previous_swap_end_timestamp; @@ -841,11 +841,12 @@ metrics_end_frame_pre_swap (metrics_t *metrics) /* We've waited one frame to ensure we have a timestamp * result. So the time we've actually measured here is * for the previous frame. */ - printf ("frame: %d %g %g %g\n", + printf ("frame: %d %g %g %g %g\n", frames - 1, (double) frame_time_ns / 1e6, (double) latency_ns / 1e6, - cpu_time / (frame_time_ns / 1e9)); + cpu_time / (frame_time_ns / 1e9), + 0.0); } metrics->previous_swap_end_timestamp = swap_end_timestamp;