summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2009-11-11 19:45:10 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-11 19:45:10 -0800
commit91e7670d43fb5e56e2cb8c5fd7bddb1f3dbeb162 (patch)
tree614c806a9b4fb1d3e2579fdc3460c30cbbdc7ab8 /tests
parent8909442e0bde5cce301ae249ab658db22d36f093 (diff)
parent9324f11afe9366cd5479828a214dc8de8696a5ab (diff)
downloadLegacyCamera-91e7670d43fb5e56e2cb8c5fd7bddb1f3dbeb162.zip
LegacyCamera-91e7670d43fb5e56e2cb8c5fd7bddb1f3dbeb162.tar.gz
LegacyCamera-91e7670d43fb5e56e2cb8c5fd7bddb1f3dbeb162.tar.bz2
am 9324f11a: Add postview callback to know when the captured image is shown. b2237074
Merge commit '9324f11afe9366cd5479828a214dc8de8696a5ab' into eclair-mr2 * commit '9324f11afe9366cd5479828a214dc8de8696a5ab': Add postview callback to know when the captured image is shown. b2237074
Diffstat (limited to 'tests')
-rwxr-xr-xtests/src/com/android/camera/stress/CameraLatency.java54
1 files changed, 27 insertions, 27 deletions
diff --git a/tests/src/com/android/camera/stress/CameraLatency.java b/tests/src/com/android/camera/stress/CameraLatency.java
index 221e7b1..0c5059f 100755
--- a/tests/src/com/android/camera/stress/CameraLatency.java
+++ b/tests/src/com/android/camera/stress/CameraLatency.java
@@ -40,14 +40,14 @@ public class CameraLatency extends ActivityInstrumentationTestCase2 <Camera> {
private long mTotalAutoFocusTime;
private long mTotalShutterLag;
- private long mTotalShutterAndRawPictureCallbackTime;
- private long mTotalJpegPictureCallbackTimeLag;
- private long mTotalRawPictureAndJpegPictureCallbackTime;
+ private long mTotalShutterToPictureDisplayedTime;
+ private long mTotalPictureDisplayedToJpegCallbackTime;
+ private long mTotalJpegCallbackToFirstFrameTime;
private long mAvgAutoFocusTime;
private long mAvgShutterLag = mTotalShutterLag;
- private long mAvgShutterAndRawPictureCallbackTime;
- private long mAveJpegPictureCallbackTimeLag;
- private long mAvgRawPictureAndJpegPictureCallbackTime;
+ private long mAvgShutterToPictureDisplayedTime;
+ private long mAvgPictureDisplayedToJpegCallbackTime;
+ private long mAvgJpegCallbackToFirstFrameTime;
public CameraLatency() {
super("com.android.camera", Camera.class);
@@ -78,11 +78,11 @@ public class CameraLatency extends ActivityInstrumentationTestCase2 <Camera> {
Camera c = getActivity();
mTotalAutoFocusTime += c.mAutoFocusTime;
mTotalShutterLag += c.mShutterLag;
- mTotalShutterAndRawPictureCallbackTime +=
- c.mShutterAndRawPictureCallbackTime;
- mTotalJpegPictureCallbackTimeLag += c.mJpegPictureCallbackTimeLag;
- mTotalRawPictureAndJpegPictureCallbackTime +=
- c.mRawPictureAndJpegPictureCallbackTime;
+ mTotalShutterToPictureDisplayedTime +=
+ c.mShutterToPictureDisplayedTime;
+ mTotalPictureDisplayedToJpegCallbackTime +=
+ c.mPictureDisplayedToJpegCallbackTime;
+ mTotalJpegCallbackToFirstFrameTime += c.mJpegCallbackToFirstFrameTime;
}
}
} catch (Exception e) {
@@ -96,12 +96,12 @@ public class CameraLatency extends ActivityInstrumentationTestCase2 <Camera> {
int numberofRun = TOTAL_NUMBER_OF_IMAGECAPTURE - 1;
mAvgAutoFocusTime = mTotalAutoFocusTime / numberofRun;
mAvgShutterLag = mTotalShutterLag / numberofRun;
- mAvgShutterAndRawPictureCallbackTime =
- mTotalShutterAndRawPictureCallbackTime / numberofRun;
- mAveJpegPictureCallbackTimeLag =
- mTotalJpegPictureCallbackTimeLag / numberofRun;
- mAvgRawPictureAndJpegPictureCallbackTime =
- mTotalRawPictureAndJpegPictureCallbackTime / numberofRun;
+ mAvgShutterToPictureDisplayedTime =
+ mTotalShutterToPictureDisplayedTime / numberofRun;
+ mAvgPictureDisplayedToJpegCallbackTime =
+ mTotalPictureDisplayedToJpegCallbackTime / numberofRun;
+ mAvgJpegCallbackToFirstFrameTime =
+ mTotalJpegCallbackToFirstFrameTime / numberofRun;
try {
FileWriter fstream = null;
@@ -111,11 +111,11 @@ public class CameraLatency extends ActivityInstrumentationTestCase2 <Camera> {
out.write("Number of loop: " + TOTAL_NUMBER_OF_IMAGECAPTURE + "\n");
out.write("Avg AutoFocus = " + mAvgAutoFocusTime + "\n");
out.write("Avg mShutterLag = " + mAvgShutterLag + "\n");
- out.write("Avg mShutterAndRawPictureCallbackTime = "
- + mAvgShutterAndRawPictureCallbackTime + "\n");
- out.write("Avg mJpegPictureCallbackTimeLag = " + mAveJpegPictureCallbackTimeLag + "\n");
- out.write("Avg mRawPictureAndJpegPictureCallbackTime = "
- + mAvgRawPictureAndJpegPictureCallbackTime + "\n");
+ out.write("Avg mShutterToPictureDisplayedTime = "
+ + mAvgShutterToPictureDisplayedTime + "\n");
+ out.write("Avg mPictureDisplayedToJpegCallbackTime = "
+ + mAvgPictureDisplayedToJpegCallbackTime + "\n");
+ out.write("Avg mJpegCallbackToFirstFrameTime = " + mAvgJpegCallbackToFirstFrameTime + "\n");
out.close();
fstream.close();
} catch (Exception e) {
@@ -124,11 +124,11 @@ public class CameraLatency extends ActivityInstrumentationTestCase2 <Camera> {
Log.v(TAG, "Avg AutoFocus = " + mAvgAutoFocusTime);
Log.v(TAG, "Avg mShutterLag = " + mAvgShutterLag);
- Log.v(TAG, "Avg mShutterAndRawPictureCallbackTime = "
- + mAvgShutterAndRawPictureCallbackTime);
- Log.v(TAG, "Avg mJpegPictureCallbackTimeLag = " + mAveJpegPictureCallbackTimeLag);
- Log.v(TAG, "Avg mRawPictureAndJpegPictureCallbackTime = "
- + mAvgRawPictureAndJpegPictureCallbackTime);
+ Log.v(TAG, "Avg mShutterToPictureDisplayedTime = "
+ + mAvgShutterToPictureDisplayedTime);
+ Log.v(TAG, "Avg mPictureDisplayedToJpegCallbackTime = "
+ + mAvgPictureDisplayedToJpegCallbackTime);
+ Log.v(TAG, "Avg mJpegCallbackToFirstFrameTime = " + mAvgJpegCallbackToFirstFrameTime);
assertTrue("testImageCapture", true);
}
}