From b4a04889d2e986757c4879971cb0003e2bafe379 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 9 Nov 2013 18:47:10 -0800 Subject: [PATCH] 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. --- metrics.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.43.0