diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 117: Average all the individual FPS values to calculate the final score.

Message ID 20110804142425.30130.54363.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org Aug. 4, 2011, 2:24 p.m. UTC
------------------------------------------------------------
revno: 117
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
branch nick: trunk
timestamp: Thu 2011-08-04 15:21:27 +0100
message:
  Average all the individual FPS values to calculate the final score.
modified:
  src/main.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/main.cpp'
--- src/main.cpp	2011-08-02 14:29:51 +0000
+++ src/main.cpp	2011-08-04 14:21:27 +0000
@@ -116,6 +116,7 @@ 
 do_benchmark(Canvas &canvas, vector<Benchmark *> &benchmarks)
 {
     unsigned score = 0;
+    unsigned int benchmarks_run = 0;
 
     for (vector<Benchmark *>::iterator bench_iter = benchmarks.begin();
          bench_iter != benchmarks.end();
@@ -142,6 +143,7 @@ 
 
             Log::info(" FPS: %u\n", scene.average_fps());
             score += scene.average_fps();
+            benchmarks_run++;
         }
 
         bench->teardown_scene();
@@ -150,6 +152,9 @@ 
             break;
     }
 
+    if (benchmarks_run)
+        score /= benchmarks_run;
+
     Log::info("=======================================================\n");
     Log::info("                                  glmark2 Score: %u \n", score);
     Log::info("=======================================================\n");