Add sustained performance test results warning am: 00168f1321
am: 47c4f3d15c
Change-Id: Ie216ab218b74724e7cf1eb1d22efacfd57422a6b
diff --git a/hostsidetests/sustainedperf/src/android/SustainedPerformance/cts/SustainedPerformanceHostTest.java b/hostsidetests/sustainedperf/src/android/SustainedPerformance/cts/SustainedPerformanceHostTest.java
index 7b3a30c..a086e64 100644
--- a/hostsidetests/sustainedperf/src/android/SustainedPerformance/cts/SustainedPerformanceHostTest.java
+++ b/hostsidetests/sustainedperf/src/android/SustainedPerformance/cts/SustainedPerformanceHostTest.java
@@ -240,15 +240,21 @@
device.executeShellCommand("settings put global airplane_mode_on 0");
device.executeShellCommand("am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false");
- double perfdegradapp = (appResultsWithMode.get(1) - appResultsWithoutMode.get(1))*100/appResultsWithMode.get(1);
- double perfdegraddhry = (dhrystoneResultsWithoutMode.get(0) - dhrystoneResultsWithMode.get(0))*100/dhrystoneResultsWithoutMode.get(0);
+ double resDhry = dhrystoneResultsWithMode.get(2);
+ double resApp = appResultsWithMode.get(2);
+
+ /* Report if performance is below 5% margin for both dhrystone and shader */
+ if ((resDhry > 5) || (resApp > 5)) {
+ Log.w("SustainedPerformanceHostTests",
+ "Sustainable mode results, Dhrystone: " + resDhry + " App: " + resApp);
+ }
/*
- * Checks if the performance in the mode is consistent with
- * 5% error margin.
+ * Error if the performance in the mode is not consistent with
+ * 5% error margin for shader and 10% error margin for dhrystone.
*/
assertFalse("Results in the mode are not sustainable",
- (dhrystoneResultsWithMode.get(2) > 10) ||
- (appResultsWithMode.get(2)) > 5);
+ (resDhry > 10) ||
+ (resApp > 5));
}
}