]> git.cworth.org Git - fips/commitdiff
Add placeholder value for GPU load.
authorCarl Worth <cworth@cworth.org>
Sun, 10 Nov 2013 02:47:10 +0000 (18:47 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 11 Nov 2013 18:31:42 +0000 (10:31 -0800)
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

index 0c61e0ebab1620e715b4dad64c825c86452dade5..e37618665d508cf67bd9614bae65665f229bccd0 100644 (file)
--- 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;