glbench: Add verbose flag and hook it up to print per-iteration times

Add a "verbose" flag to allow printing some more verbose messages when
running the glbench test manually.

Also, add a 'verbose' message that prints per-iteration test times.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

BUG=chrome-os-partner:48800
TEST=/usr/local/autotest/deps/glbench/glbench -tests=texture_update -verbose
 => Shows per-iteration run-times
TEST=/usr/local/autotest/deps/glbench/glbench -tests=texture_update
 => Does not show per-iteration run-times (same as before this change)

Change-Id: I2d07787c62e1258753c7a4a52d644239dd88a061
Reviewed-on: https://chromium-review.googlesource.com/319920
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Ilja Friedel <ihf@chromium.org>
diff --git a/client/deps/glbench/src/main.cc b/client/deps/glbench/src/main.cc
index 8e4514d..eb0acd4 100644
--- a/client/deps/glbench/src/main.cc
+++ b/client/deps/glbench/src/main.cc
@@ -32,7 +32,9 @@
             "Useful for running in BVT or debugging a failure.  Implies notemp");
 DEFINE_bool(list, false, "List available tests");
 DEFINE_bool(notemp, false, "Skip temperature checking");
+DEFINE_bool(verbose, false, "Print extra debugging messages");
 
+bool g_verbose;
 GLint g_max_texture_size;
 bool g_hasty;
 bool g_notemp;
@@ -105,6 +107,8 @@
   SetBasePathFromArgv0(argv[0], "src");
   google::ParseCommandLineFlags(&argc, &argv, false);
 
+  g_verbose = FLAGS_verbose;
+
   g_main_gl_interface.reset(GLInterface::Create());
   if (!g_main_gl_interface->Init()) {
     printf("# Error: Failed to initialize %s.\n", argv[0]);