summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Shan Emily Lau <yslau@google.com>2010-01-25 13:57:12 -0800
committerYu Shan Emily Lau <yslau@google.com>2010-01-25 18:08:36 -0800
commit499e3b0ab79d8c1b0042f3b5d0beea05ec5bdbc0 (patch)
tree76b13e60b2bf8659fb1da6288d3b283ab88a0d8f
parentca46c05b2dd8a0081d0a8b384f4fe3bcd215c9db (diff)
downloadpackages_apps_LegacyCamera-499e3b0ab79d8c1b0042f3b5d0beea05ec5bdbc0.zip
packages_apps_LegacyCamera-499e3b0ab79d8c1b0042f3b5d0beea05ec5bdbc0.tar.gz
packages_apps_LegacyCamera-499e3b0ab79d8c1b0042f3b5d0beea05ec5bdbc0.tar.bz2
Modify the camera lantency report tag so that it is easier to publish to the dashboard.
-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