From patchwork Fri Jan 13 15:07:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 6181 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 4A1C723E01 for ; Fri, 13 Jan 2012 15:07:17 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 32F76A18813 for ; Fri, 13 Jan 2012 15:07:17 +0000 (UTC) Received: by bkbzu5 with SMTP id zu5so2927826bkb.11 for ; Fri, 13 Jan 2012 07:07:16 -0800 (PST) Received: by 10.204.149.130 with SMTP id t2mr636362bkv.9.1326467236793; Fri, 13 Jan 2012 07:07:16 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs31854bkc; Fri, 13 Jan 2012 07:07:16 -0800 (PST) Received: by 10.180.93.132 with SMTP id cu4mr563851wib.9.1326467235004; Fri, 13 Jan 2012 07:07:15 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id cm4si6305550wib.30.2012.01.13.07.07.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jan 2012 07:07:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Rliio-0007eM-OG for ; Fri, 13 Jan 2012 15:07:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id A8AE8E03C8 for ; Fri, 13 Jan 2012 15:07:14 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 180 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 180: Android: Display glmark2 score when finishing. Message-Id: <20120113150714.16017.11386.launchpad@ackee.canonical.com> Date: Fri, 13 Jan 2012 15:07:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14664"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 30e5861156056aaa8c0029d1853a0729165217f9 ------------------------------------------------------------ revno: 180 committer: Alexandros Frantzis branch nick: trunk timestamp: Fri 2012-01-13 16:03:23 +0200 message: Android: Display glmark2 score when finishing. modified: src/android.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 === modified file 'src/android.cpp' --- src/android.cpp 2012-01-13 13:48:41 +0000 +++ src/android.cpp 2012-01-13 14:03:23 +0000 @@ -96,13 +96,19 @@ { static std::vector::iterator bench_iter = g_benchmarks.begin(); static Scene *scene = 0; + static unsigned int score = 0; + static unsigned int benchmarks_run = 0; if (!scene) { if (bench_iter != g_benchmarks.end()) { scene = &(*bench_iter)->setup_scene(); } - else + else { + if (benchmarks_run) + score /= benchmarks_run; + Log::info("glmark2 Score: %u\n", score); return false; + } } if (scene->is_running()) { @@ -117,10 +123,12 @@ * may have changed the state. */ if (!scene->is_running()) { + Log::info("%s FPS: %u", scene->info_string().c_str(), scene->average_fps()); + score += scene->average_fps(); (*bench_iter)->teardown_scene(); - Log::info("%s FPS: %u", scene->info_string().c_str(), scene->average_fps()); scene = 0; bench_iter++; + benchmarks_run++; } return true;