summaryrefslogtreecommitdiffstats
path: root/tests/TileBenchmark/res
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-07-15 16:24:37 -0700
committerChris Craik <ccraik@google.com>2011-07-18 17:24:48 -0700
commit5888ec2b30d2c76de84e3b840bf286fa371ccb4f (patch)
tree88a0e1c2f54555092979cfe46bb4f5102958ce86 /tests/TileBenchmark/res
parent9cba686366870b3a4c69bcec0eb4200352ce481d (diff)
downloadframeworks_base-5888ec2b30d2c76de84e3b840bf286fa371ccb4f.zip
frameworks_base-5888ec2b30d2c76de84e3b840bf286fa371ccb4f.tar.gz
frameworks_base-5888ec2b30d2c76de84e3b840bf286fa371ccb4f.tar.bz2
Added TileBenchmark
Adds TileBenchmark app, which loads pages in webview and scrolls through them automatically, measuring rendering and allocation information. Change-Id: Ieaf5bbcec604c99aaf16822915e58bfc495011ec
Diffstat (limited to 'tests/TileBenchmark/res')
-rw-r--r--tests/TileBenchmark/res/drawable-hdpi/icon.pngbin0 -> 4147 bytes
-rw-r--r--tests/TileBenchmark/res/drawable-ldpi/icon.pngbin0 -> 1723 bytes
-rw-r--r--tests/TileBenchmark/res/drawable-mdpi/icon.pngbin0 -> 2574 bytes
-rw-r--r--tests/TileBenchmark/res/layout/main.xml53
-rw-r--r--tests/TileBenchmark/res/layout/playback.xml58
-rw-r--r--tests/TileBenchmark/res/values/colors.xml25
-rw-r--r--tests/TileBenchmark/res/values/strings.xml67
7 files changed, 203 insertions, 0 deletions
diff --git a/tests/TileBenchmark/res/drawable-hdpi/icon.png b/tests/TileBenchmark/res/drawable-hdpi/icon.png
new file mode 100644
index 0000000..8074c4c
--- /dev/null
+++ b/tests/TileBenchmark/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/tests/TileBenchmark/res/drawable-ldpi/icon.png b/tests/TileBenchmark/res/drawable-ldpi/icon.png
new file mode 100644
index 0000000..1095584
--- /dev/null
+++ b/tests/TileBenchmark/res/drawable-ldpi/icon.png
Binary files differ
diff --git a/tests/TileBenchmark/res/drawable-mdpi/icon.png b/tests/TileBenchmark/res/drawable-mdpi/icon.png
new file mode 100644
index 0000000..a07c69f
--- /dev/null
+++ b/tests/TileBenchmark/res/drawable-mdpi/icon.png
Binary files differ
diff --git a/tests/TileBenchmark/res/layout/main.xml b/tests/TileBenchmark/res/layout/main.xml
new file mode 100644
index 0000000..4a81da6
--- /dev/null
+++ b/tests/TileBenchmark/res/layout/main.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ >
+ <LinearLayout
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+ <Button
+ android:id="@+id/inspect"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/inspect_log"
+ />
+ <Spinner
+ android:id="@+id/velocity"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:prompt="@string/desired_scroll_velocity"
+ />
+ <EditText
+ android:id="@+id/url"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:inputType="textUri"
+ android:imeOptions="actionGo"
+ android:layout_weight="1"
+ />
+ </LinearLayout>
+ <com.test.tilebenchmark.ProfiledWebView
+ android:id="@+id/web"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ />
+</LinearLayout>
diff --git a/tests/TileBenchmark/res/layout/playback.xml b/tests/TileBenchmark/res/layout/playback.xml
new file mode 100644
index 0000000..aa1c8a4
--- /dev/null
+++ b/tests/TileBenchmark/res/layout/playback.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ >
+ <LinearLayout
+ android:id="@+id/top"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ >
+ <Button
+ android:id="@+id/backward"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/backward"
+ />
+ <TextView
+ android:id="@+id/frame_display"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:layout_weight="1"
+ />
+ <Button
+ android:id="@+id/forward"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/forward"
+ />
+ <SeekBar
+ android:id="@+id/seek_bar"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_weight="10"
+ />
+ </LinearLayout>
+ <com.test.tilebenchmark.PlaybackView
+ android:id="@+id/playback"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ />
+</LinearLayout>
diff --git a/tests/TileBenchmark/res/values/colors.xml b/tests/TileBenchmark/res/values/colors.xml
new file mode 100644
index 0000000..3958083
--- /dev/null
+++ b/tests/TileBenchmark/res/values/colors.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- The color of tiles with valid textures -->
+ <color name="ready_tile">#ff4ac230</color>
+ <!-- The color of tiles with stale / invalid textures -->
+ <color name="unready_tile">#ff744400</color>
+ <!-- Background color for logged URLs -->
+ <color name="finished_url">#ff004000</color>
+ <!-- Background color for URLs with logging in progress -->
+ <color name="unfinished_url">#ff400000</color>
+</resources>
diff --git a/tests/TileBenchmark/res/values/strings.xml b/tests/TileBenchmark/res/values/strings.xml
new file mode 100644
index 0000000..f70ee2c
--- /dev/null
+++ b/tests/TileBenchmark/res/values/strings.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- Button, steps back a single frame [CHAR LIMIT=15] -->
+ <string name="backward">Backward</string>
+ <!-- Button, steps forward a single frame [CHAR LIMIT=15] -->
+ <string name="forward">Forward</string>
+ <!-- The name of the application [CHAR LIMIT=20] -->
+ <string name="app_name">TileBenchmark</string>
+ <!-- name of the auto-scroller / tile logger activity [CHAR LIMIT=100] -->
+ <string name="profile_activity">Webview Profiler</string>
+ <!-- name of the tile log playback activity [CHAR LIMIT=100] -->
+ <string name="playback_activity">Webview Tile Playback</string>
+ <!-- Button, loads another tile log [CHAR LIMIT=30] -->
+ <string name="loadbutton">Load</string>
+ <!-- Button, opens the playback activity [CHAR LIMIT=20] -->
+ <string name="inspect_log">Inspect Log</string>
+ <!-- The speed of auto-scrolling [CHAR LIMIT=30] -->
+ <string name="desired_scroll_velocity">Choose Scroll Velocity</string>
+ <!-- Pixels moved per frame [CHAR LIMIT=10] -->
+ <string-array name="velocity_array">
+ <item>1</item>
+ <item>25</item>
+ <item>50</item>
+ <item>100</item>
+ <item>200</item>
+ <item>400</item>
+ </string-array>
+ <!-- 25th percentile - 25% of frames fall below this value [CHAR LIMIT=12]
+ -->
+ <string name="percentile_25">25%ile</string>
+ <!-- 50th percentile - 50% of frames fall below this value (aka median)
+ [CHAR LIMIT=12] -->
+ <string name="percentile_50">median</string>
+ <!-- 75th percentile - 75% of frames fall below this value [CHAR LIMIT=12]
+ -->
+ <string name="percentile_75">75%ile</string>
+ <!-- Frame rate [CHAR LIMIT=15] -->
+ <string name="frames_per_second">Frames/sec</string>
+ <!-- Portion of viewport covered by good tiles [CHAR LIMIT=15] -->
+ <string name="viewport_coverage">Coverage</string>
+ <!-- Format string for stat value overlay [CHAR LIMIT=15] -->
+ <string name="format_stat">%4.4f</string>
+ <!-- Format string for displaying aggregate stats+values (nr of valid tiles,
+ etc.) [CHAR LIMIT=20] -->
+ <string name="format_stat_name">%1$9s %2$3d</string>
+ <!-- Text hovering over canvas, number of tiles ready [CHAR LIMIT=15] -->
+ <string name="ready_tiles">Ready Tiles</string>
+ <!-- Text hovering over canvas, number tiles not ready [CHAR LIMIT=15] -->
+ <string name="unready_tiles">Unready Tiles</string>
+ <!-- Text hovering over canvas, number of tiles that haven't been
+ allocated to a place on the page [CHAR LIMIT=15] -->
+ <string name="unplaced_tiles">Unplaced Tiles</string>
+</resources>