Merge lp:~linaro-graphics-wg/glmark2/frame-time into lp:glmark2/2011.11

Proposed by Alexandros Frantzis
Status: Merged
Merged at revision: 222
Proposed branch: lp:~linaro-graphics-wg/glmark2/frame-time
Merge into: lp:glmark2/2011.11
Diff against target: 34 lines (+9/-4)
2 files modified
src/android.cpp (+4/-2)
src/main-loop.cpp (+5/-2)
To merge this branch: bzr merge lp:~linaro-graphics-wg/glmark2/frame-time
Reviewer Review Type Date Requested Status
Jesse Barker Approve
Review via email: mp+110531@code.launchpad.net

Description of the change

Display average frame time in addition to FPS for each scene.

To post a comment you must log in.
Revision history for this message
Jesse Barker (jesse-barker) wrote :

Seems fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/android.cpp'
2--- src/android.cpp 2012-05-15 12:28:51 +0000
3+++ src/android.cpp 2012-06-15 13:54:30 +0000
4@@ -48,8 +48,10 @@
5
6 virtual void log_scene_result()
7 {
8- Log::info("%s FPS: %u", scene_->info_string().c_str(),
9- scene_->average_fps());
10+ Log::info("%s FPS: %u FrameTime: %.3f ms\n",
11+ scene_->info_string().c_str(),
12+ scene_->average_fps(),
13+ 1000.0 / scene_->average_fps());
14 }
15 };
16
17
18=== modified file 'src/main-loop.cpp'
19--- src/main-loop.cpp 2012-02-15 17:09:14 +0000
20+++ src/main-loop.cpp 2012-06-15 13:54:30 +0000
21@@ -134,8 +134,11 @@
22 void
23 MainLoop::log_scene_result()
24 {
25- static const std::string format(Log::continuation_prefix + " FPS: %u\n");
26- Log::info(format.c_str(), scene_->average_fps());
27+ static const std::string format_fps(Log::continuation_prefix + " FPS: %u");
28+ static const std::string format_ms(Log::continuation_prefix + " FrameTime: %.3f ms\n");
29+
30+ Log::info(format_fps.c_str(), scene_->average_fps());
31+ Log::info(format_ms.c_str(), 1000.0 / scene_->average_fps());
32 }
33
34 void

Subscribers

People subscribed via source and target branches