1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-13 22:28:36 +00:00

Add dumpsys instrumentation to Gmail workload

Tested on Asus Zenfone 2
This commit is contained in:
James Hartley 2016-06-02 12:41:37 +01:00
parent 3a4ae9f7b2
commit 1328c5be3d
2 changed files with 25 additions and 0 deletions

View File

@ -78,6 +78,8 @@ public class UiAutomation extends UxPerfUiAutomation {
}
public void clickNewMail() throws Exception {
String testTag = "click_new_mail";
UiObject conversationView = new UiObject(new UiSelector()
.resourceId("com.google.android.gm:id/conversation_list_view")
.className("android.widget.ListView"));
@ -88,9 +90,20 @@ public class UiAutomation extends UxPerfUiAutomation {
Timer result = new Timer();
UiObject newMailButton = getUiObjectByDescription("Compose", "android.widget.ImageButton");
String gfxInfologName = String.format(testTag + "_gfxInfo.log");
String surfFlingerlogName = String.format(testTag + "_surfFlinger.log");
result.start();
startDumpsysGfxInfo(parameters);
startDumpsysSurfaceFlinger(parameters);
newMailButton.clickAndWaitForNewWindow(timeout);
stopDumpsysSurfaceFlinger(parameters, surfFlingerlogName);
stopDumpsysGfxInfo(parameters, gfxInfologName);
result.end();
timingResults.put("Create_newMail", result);
}
@ -145,6 +158,9 @@ public class UiAutomation extends UxPerfUiAutomation {
}
public void attachFiles() throws Exception {
String testTag = "attach_files";
UiObject attachIcon = getUiObjectByResourceId("com.google.android.gm:id/add_attachment",
"android.widget.TextView");
@ -154,6 +170,12 @@ public class UiAutomation extends UxPerfUiAutomation {
Timer result = new Timer();
result.start();
String gfxInfologName = String.format(testTag + "_" + (i + 1) + "_gfxInfo.log");
String surfFlingerlogName = String.format(testTag + "_" + (i + 1) + "_surfFlinger.log");
startDumpsysGfxInfo(parameters);
startDumpsysSurfaceFlinger(parameters);
attachIcon.click();
UiObject attachFile = getUiObjectByText("Attach file", "android.widget.TextView");
attachFile.clickAndWaitForNewWindow(timeout);
@ -204,6 +226,9 @@ public class UiAutomation extends UxPerfUiAutomation {
imageFileButton.click();
imageFileButton.waitUntilGone(timeout);
stopDumpsysSurfaceFlinger(parameters, surfFlingerlogName);
stopDumpsysGfxInfo(parameters, gfxInfologName);
result.end();
// Replace whitespace and full stops within the filename