summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYu Shan Emily Lau <yslau@google.com>2010-01-25 18:16:52 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-01-25 18:16:52 -0800
commit3cd9af7e1a83b15994537e54f45f8453ae5eaa9a (patch)
tree76b13e60b2bf8659fb1da6288d3b283ab88a0d8f /tests
parentfc1d47fe75900fe6d2ab4793a96767421e2309a5 (diff)
parent499e3b0ab79d8c1b0042f3b5d0beea05ec5bdbc0 (diff)
downloadLegacyCamera-3cd9af7e1a83b15994537e54f45f8453ae5eaa9a.zip
LegacyCamera-3cd9af7e1a83b15994537e54f45f8453ae5eaa9a.tar.gz
LegacyCamera-3cd9af7e1a83b15994537e54f45f8453ae5eaa9a.tar.bz2
am 499e3b0a: Modify the camera lantency report tag so that it is easier to publish to the dashboard.
Merge commit '499e3b0ab79d8c1b0042f3b5d0beea05ec5bdbc0' into eclair-plus-aosp * commit '499e3b0ab79d8c1b0042f3b5d0beea05ec5bdbc0': Modify the camera lantency report tag so that it is easier to publish to the dashboard.
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/camera/stress/CameraStartUp.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/src/com/android/camera/stress/CameraStartUp.java b/tests/src/com/android/camera/stress/CameraStartUp.java
index b59d724..d8c785f 100644
--- a/tests/src/com/android/camera/stress/CameraStartUp.java
+++ b/tests/src/com/android/camera/stress/CameraStartUp.java
@@ -69,8 +69,8 @@ public class CameraStartUp extends InstrumentationTestCase {
return startupTime;
}
- private void writeToOutputFile(String startupTag, long totalStartupTime,
- String individualStartupTime, boolean firstStartUp) throws Exception {
+ private void writeToOutputFile(long totalStartupTime,
+ String individualStartupTime, boolean firstStartUp, String Type) throws Exception {
// TODO (yslau) : Need to integrate the output data with central
// dashboard
try {
@@ -78,13 +78,13 @@ public class CameraStartUp extends InstrumentationTestCase {
fstream = new FileWriter(CAMERA_TEST_OUTPUT_FILE, true);
BufferedWriter out = new BufferedWriter(fstream);
if (firstStartUp) {
- out.write(startupTag + ": " + totalStartupTime + "\n");
+ out.write("First " + Type + " Startup: " + totalStartupTime + "\n");
} else {
long averageStartupTime = totalStartupTime / (TOTAL_NUMBER_OF_STARTUP -1);
- out.write(startupTag + "\n");
+ out.write(Type + "startup time: " + "\n");
out.write("Number of loop: " + (TOTAL_NUMBER_OF_STARTUP -1) + "\n");
out.write(individualStartupTime + "\n\n");
- out.write("Average startup time :" + averageStartupTime + " ms\n\n");
+ out.write(Type + " average startup time: " + averageStartupTime + " ms\n\n");
}
out.close();
fstream.close();
@@ -103,7 +103,7 @@ public class CameraStartUp extends InstrumentationTestCase {
if (i == 0) {
// Capture the first startup time individually
long firstStartUpTime = launchVideo();
- writeToOutputFile("First Video Startup: ", firstStartUpTime, "na", true);
+ writeToOutputFile(firstStartUpTime, "na", true, "Video");
} else {
startupTime = launchVideo();
totalStartupTime += startupTime;
@@ -111,8 +111,7 @@ public class CameraStartUp extends InstrumentationTestCase {
}
}
Log.v(TAG, "totalStartupTime =" + totalStartupTime);
- writeToOutputFile("Video Recorder Startup Time: ", totalStartupTime,
- individualStartupTime, false);
+ writeToOutputFile(totalStartupTime, individualStartupTime, false, "Video");
}
@LargeTest
@@ -125,7 +124,7 @@ public class CameraStartUp extends InstrumentationTestCase {
if (i == 0) {
// Capture the first startup time individually
long firstStartUpTime = launchCamera();
- writeToOutputFile("First Camera Startup: ", firstStartUpTime, "na", true);
+ writeToOutputFile(firstStartUpTime, "na", true, "Camera");
} else {
startupTime = launchCamera();
totalStartupTime += startupTime;
@@ -133,7 +132,7 @@ public class CameraStartUp extends InstrumentationTestCase {
}
}
Log.v(TAG, "totalStartupTime =" + totalStartupTime);
- writeToOutputFile("Camera Startup Time: ", totalStartupTime,
- individualStartupTime, false);
+ writeToOutputFile(totalStartupTime,
+ individualStartupTime, false, "Camera");
}
} \ No newline at end of file