1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-21 01:59:13 +00:00

Remove redundant logging from Multiapp Workload

Remove duplicate logging that is already captured in the standalone
workloads for Gmail and Skype. Expand comment for tagPhoto method in
Gmail workload.
This commit is contained in:
John Richardson 2016-05-19 14:33:02 +01:00
parent 2532f36a62
commit b6edd0627b
7 changed files with 4 additions and 43 deletions

View File

@ -417,7 +417,9 @@ public class UiAutomation extends UxPerfUiAutomation {
navigateUpButton.click(); navigateUpButton.click();
} }
// Helper to tag an individual photograph based on index in wa-working gallery. // Helper to tag an individual photograph based on the index in wa-working
// gallery. After long clicking it tags the photograph with a tick in the
// corner of the image to indicate that the photograph has been selected
public void tagPhoto(final int index) throws Exception { public void tagPhoto(final int index) throws Exception {
UiObject workdir = getUiObjectByText("wa-working", "android.widget.TextView"); UiObject workdir = getUiObjectByText("wa-working", "android.widget.TextView");
workdir.clickAndWaitForNewWindow(); workdir.clickAndWaitForNewWindow();

View File

@ -18,7 +18,6 @@ public class UiAutomation extends UxPerfUiAutomation {
public static String TAG = "uxperf_multiapp"; public static String TAG = "uxperf_multiapp";
public Bundle parameters; public Bundle parameters;
private String outputDir;
private LinkedHashMap<String, Timer> timingResults = new LinkedHashMap<String, Timer>(); private LinkedHashMap<String, Timer> timingResults = new LinkedHashMap<String, Timer>();
public void runUiAutomation() throws Exception { public void runUiAutomation() throws Exception {
@ -50,18 +49,9 @@ public class UiAutomation extends UxPerfUiAutomation {
} }
private void sendToGmail() throws Exception { private void sendToGmail() throws Exception {
final String dumpsysTag = "sendToGmail";
final String PACKAGE = "com.google.android.gm";
String outputDir = parameters.getString("output_dir", "/sdcard/wa-working");
com.arm.wlauto.uiauto.gmail.UiAutomation gmail = com.arm.wlauto.uiauto.gmail.UiAutomation gmail =
new com.arm.wlauto.uiauto.gmail.UiAutomation(); new com.arm.wlauto.uiauto.gmail.UiAutomation();
Timer result = new Timer();
result.start();
initDumpsysGfxInfo(PACKAGE);
shareUsingApp("Gmail"); shareUsingApp("Gmail");
gmail.clearFirstRunDialogues(); gmail.clearFirstRunDialogues();
@ -73,16 +63,11 @@ public class UiAutomation extends UxPerfUiAutomation {
gmail.setSubjectField(); gmail.setSubjectField();
gmail.setComposeField(); gmail.setComposeField();
gmail.clickSendButton(); gmail.clickSendButton();
exitDumpsysGfxInfo(PACKAGE, new File(outputDir, dumpsysTag + "_gfxInfo.log"));
result.end();
timingResults.put("send_to_gmail_contact", result);
} }
private void waitForSync() throws Exception { private void waitForSync() throws Exception {
// After the initial share request on some devices Gmail returns back // After the initial share request on some devices Gmail returns back
// to the launching app, so we need to share the photo onces more and // to the launching app, so we need to share the photo once more and
// wait for Gmail to sync. // wait for Gmail to sync.
com.arm.wlauto.uiauto.googlephotos.UiAutomation googlephotos = com.arm.wlauto.uiauto.googlephotos.UiAutomation googlephotos =
new com.arm.wlauto.uiauto.googlephotos.UiAutomation(); new com.arm.wlauto.uiauto.googlephotos.UiAutomation();
@ -96,51 +81,25 @@ public class UiAutomation extends UxPerfUiAutomation {
} }
private void logIntoSkype() throws Exception { private void logIntoSkype() throws Exception {
final String dumpsysTag = "logInToSkype";
final String PACKAGE = "com.skype.raider";
String outputDir = parameters.getString("output_dir", "/sdcard/wa-working");
com.arm.wlauto.uiauto.skype.UiAutomation skype = com.arm.wlauto.uiauto.skype.UiAutomation skype =
new com.arm.wlauto.uiauto.skype.UiAutomation(); new com.arm.wlauto.uiauto.skype.UiAutomation();
String loginName = parameters.getString("my_id"); String loginName = parameters.getString("my_id");
String loginPass = parameters.getString("my_pwd"); String loginPass = parameters.getString("my_pwd");
Timer result = new Timer();
result.start();
initDumpsysGfxInfo(PACKAGE);
shareUsingApp("Skype"); shareUsingApp("Skype");
skype.handleLoginScreen(loginName, loginPass); skype.handleLoginScreen(loginName, loginPass);
confirmAccess(); confirmAccess();
exitDumpsysGfxInfo(PACKAGE, new File(outputDir, dumpsysTag + "_gfxInfo.log"));
result.end();
timingResults.put("log_into_skype", result);
} }
private void sendToSkype() throws Exception { private void sendToSkype() throws Exception {
final String dumpsysTag = "sendToSkype";
final String PACKAGE = "com.skype.raider";
String outputDir = parameters.getString("output_dir", "/sdcard/wa-working");
com.arm.wlauto.uiauto.skype.UiAutomation skype = com.arm.wlauto.uiauto.skype.UiAutomation skype =
new com.arm.wlauto.uiauto.skype.UiAutomation(); new com.arm.wlauto.uiauto.skype.UiAutomation();
String contactName = parameters.getString("name").replace("_", " "); String contactName = parameters.getString("name").replace("_", " ");
Timer result = new Timer();
result.start();
initDumpsysGfxInfo(PACKAGE);
shareUsingApp("Skype"); shareUsingApp("Skype");
skype.searchForContact(contactName); skype.searchForContact(contactName);
exitDumpsysGfxInfo(PACKAGE, new File(outputDir, dumpsysTag + "_gfxInfo.log"));
result.end();
timingResults.put("send_to_skype_contact", result);
} }
private void shareUsingApp(String appName) throws Exception { private void shareUsingApp(String appName) throws Exception {