summaryrefslogtreecommitdiff
path: root/adservices/tests
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-01-08 19:53:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2024-01-08 19:53:53 +0000
commitdb57ff4d0b0058ce7eaae317f6a6eb44748709a1 (patch)
treee23ee56343833ab918ff18216e79e1041280aee1 /adservices/tests
parentf3dc9b949b82270ead60675abd39b1a05012613e (diff)
parentc6a5047d46923384e8c91983c0f2a6485ca774a8 (diff)
downloadAdServices-db57ff4d0b0058ce7eaae317f6a6eb44748709a1.tar.gz
Merge "Update UI perf tests." into udc-mainline-prod
Diffstat (limited to 'adservices/tests')
-rw-r--r--adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/NotificationLandingPage.java10
-rw-r--r--adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/UiSettingsMainPage.java9
2 files changed, 6 insertions, 13 deletions
diff --git a/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/NotificationLandingPage.java b/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/NotificationLandingPage.java
index 779c29b097..77b20f7ea4 100644
--- a/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/NotificationLandingPage.java
+++ b/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/NotificationLandingPage.java
@@ -19,7 +19,6 @@ package android.adservices.test.scenario.adservices.ui;
import android.content.Context;
import android.os.Trace;
import android.platform.test.scenario.annotation.Scenario;
-import android.util.Log;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -40,7 +39,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Crystalball test for Topics API to collect System Heath metrics. */
@Scenario
@RunWith(JUnit4.class)
public class NotificationLandingPage {
@@ -75,19 +73,15 @@ public class NotificationLandingPage {
@Test
public void testNotificationLandingPage() throws Exception {
- final long start = System.currentTimeMillis();
-
- Trace.beginSection("NotificationTriggerEvent");
UiConstants.UX ux = UiConstants.UX.GA_UX;
if( SdkLevel.isAtLeastR() && !SdkLevel.isAtLeastS() ) {
ux = UiConstants.UX.RVC_UX;
}
+
+ Trace.beginSection("NotificationTriggerEvent");
AdservicesWorkflows.testNotificationActivityFlow(
sContext, sDevice, true, ux, true, false, true);
Trace.endSection();
-
- final long duration = System.currentTimeMillis() - start;
- Log.i(TAG, "(" + UI_NOTIFICATION_LATENCY_METRIC + ": " + duration + ")");
}
}
diff --git a/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/UiSettingsMainPage.java b/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/UiSettingsMainPage.java
index 2f3cbffcc1..a080c42a60 100644
--- a/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/UiSettingsMainPage.java
+++ b/adservices/tests/perf/src/android/adservices/test/scenario/adservices/ui/UiSettingsMainPage.java
@@ -18,7 +18,7 @@ package android.adservices.test.scenario.adservices.ui;
import android.content.Context;
import android.platform.test.scenario.annotation.Scenario;
-import android.util.Log;
+import android.os.Trace;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -39,7 +39,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Crystalball test for Topics API to collect System Heath metrics. */
@Scenario
@RunWith(JUnit4.class)
public class UiSettingsMainPage {
@@ -74,11 +73,12 @@ public class UiSettingsMainPage {
@Test
public void testSettingsPage() throws Exception {
- final long start = System.currentTimeMillis();
UiConstants.UX ux = UiConstants.UX.GA_UX;
if( SdkLevel.isAtLeastR() && !SdkLevel.isAtLeastS() ) {
ux = UiConstants.UX.RVC_UX;
}
+
+ Trace.beginSection("NotificationTriggerEvent");
AdservicesWorkflows.testSettingsPageFlow(
sContext,
sDevice,
@@ -86,7 +86,6 @@ public class UiSettingsMainPage {
/* isOptIn= */ true,
/* isFlipConsent= */ true,
/* assertOptIn= */ false);
- final long duration = System.currentTimeMillis() - start;
- Log.i(TAG, "(" + UI_SETTINGS_LATENCY_METRIC + ": " + duration + ")");
+ Trace.endSection();
}
}