From e6c07e390bd9ce99100d45fa3c8d01bbe5a5b4ff Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 17:14:42 +0200 Subject: [PATCH 01/35] Create a new AppReadyActivity and expose it to RN --- .../android/app/src/main/AndroidManifest.xml | 1 + .../com/testappplain/AppReadyActivity.java | 25 +++++++++++++++++ .../java/com/testappplain/AppReadyModule.java | 28 +++++++++++++++++++ .../com/testappplain/MainApplication.java | 20 +++++++++++-- .../android/app/src/main/AndroidManifest.xml | 1 + .../com/testappsentry/AppReadyActivity.java | 25 +++++++++++++++++ .../com/testappsentry/AppReadyModule.java | 28 +++++++++++++++++++ .../com/testappsentry/MainApplication.java | 20 +++++++++++-- 8 files changed, 144 insertions(+), 4 deletions(-) create mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java create mode 100644 performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyModule.java create mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java create mode 100644 performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyModule.java diff --git a/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml b/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml index e9f850a4f2..1634c6c5f6 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml +++ b/performance-tests/TestAppPlain/android/app/src/main/AndroidManifest.xml @@ -22,5 +22,6 @@ + diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java new file mode 100644 index 0000000000..003b93d5db --- /dev/null +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java @@ -0,0 +1,25 @@ +package com.testappplain; + +import android.os.Bundle; +import android.os.Handler; +import androidx.appcompat.app.AppCompatActivity; + +public class AppReadyActivity extends AppCompatActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(android.R.layout.simple_list_item_1); // An empty view + + // Close the activity after 1 second + new Handler() + .postDelayed( + new Runnable() { + @Override + public void run() { + finish(); + } + }, + 1000); + } +} diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyModule.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyModule.java new file mode 100644 index 0000000000..1b3bdab939 --- /dev/null +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyModule.java @@ -0,0 +1,28 @@ +package com.testappplain; + +import android.content.Intent; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContextBaseJavaModule; +import com.facebook.react.bridge.ReactMethod; + +public class AppReadyModule extends ReactContextBaseJavaModule { + + private final ReactApplicationContext reactContext; + + public AppReadyModule(ReactApplicationContext reactContext) { + super(reactContext); + this.reactContext = reactContext; + } + + @Override + public String getName() { + return "ActivityStarter"; + } + + @ReactMethod + public void startAppReadyActivity() { + Intent intent = new Intent(reactContext, AppReadyActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + reactContext.startActivity(intent); + } +} diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java index 3417a18c82..beaf4e0216 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java @@ -7,10 +7,15 @@ import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.config.ReactFeatureFlags; +import com.facebook.react.uimanager.ViewManager; import com.facebook.soloader.SoLoader; import com.testappplain.newarchitecture.MainApplicationReactNativeHost; import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.Collections; import java.util.List; public class MainApplication extends Application implements ReactApplication { @@ -22,12 +27,23 @@ public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } + ReactPackage appReadyPackage = new ReactPackage() { // Register the package + @Override + public List createNativeModules(ReactApplicationContext reactContext) { + return Arrays.asList(new AppReadyModule(reactContext)); + } + + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } + }; + @Override protected List getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); + packages.add(appReadyPackage); return packages; } diff --git a/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml b/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml index cd2501980d..ec30f9d6d9 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml +++ b/performance-tests/TestAppSentry/android/app/src/main/AndroidManifest.xml @@ -22,5 +22,6 @@ + diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java new file mode 100644 index 0000000000..418376f80f --- /dev/null +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java @@ -0,0 +1,25 @@ +package com.testappsentry; + +import android.os.Bundle; +import android.os.Handler; +import androidx.appcompat.app.AppCompatActivity; + +public class AppReadyActivity extends AppCompatActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(android.R.layout.simple_list_item_1); // An empty view + + // Close the activity after 1 second + new Handler() + .postDelayed( + new Runnable() { + @Override + public void run() { + finish(); + } + }, + 1000); + } +} diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyModule.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyModule.java new file mode 100644 index 0000000000..5f3873b9af --- /dev/null +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyModule.java @@ -0,0 +1,28 @@ +package com.testappsentry; + +import android.content.Intent; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactContextBaseJavaModule; +import com.facebook.react.bridge.ReactMethod; + +public class AppReadyModule extends ReactContextBaseJavaModule { + + private final ReactApplicationContext reactContext; + + public AppReadyModule(ReactApplicationContext reactContext) { + super(reactContext); + this.reactContext = reactContext; + } + + @Override + public String getName() { + return "ActivityStarter"; + } + + @ReactMethod + public void startAppReadyActivity() { + Intent intent = new Intent(reactContext, AppReadyActivity.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + reactContext.startActivity(intent); + } +} diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java index de25c69494..5eee67c1f7 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java @@ -7,10 +7,15 @@ import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; +import com.facebook.react.bridge.NativeModule; +import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.config.ReactFeatureFlags; +import com.facebook.react.uimanager.ViewManager; import com.facebook.soloader.SoLoader; import com.testappsentry.newarchitecture.MainApplicationReactNativeHost; import java.lang.reflect.InvocationTargetException; +import java.util.Arrays; +import java.util.Collections; import java.util.List; public class MainApplication extends Application implements ReactApplication { @@ -22,12 +27,23 @@ public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } + ReactPackage appReadyPackage = new ReactPackage() { // Register the package + @Override + public List createNativeModules(ReactApplicationContext reactContext) { + return Arrays.asList(new AppReadyModule(reactContext)); + } + + @Override + public List createViewManagers(ReactApplicationContext reactContext) { + return Collections.emptyList(); + } + }; + @Override protected List getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); + packages.add(appReadyPackage); return packages; } From 26ff4dd7813bb737cb13754c036804c4c8254877 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 17:15:22 +0200 Subject: [PATCH 02/35] Start AppReadyActivity when JS loads --- performance-tests/TestAppPlain/App.js | 9 ++++++++- performance-tests/TestAppSentry/App.js | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppPlain/App.js index f85f38d87a..d341425e6e 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppPlain/App.js @@ -6,7 +6,8 @@ * @flow strict-local */ -import React from 'react'; +import React, { useEffect } from 'react'; +import { NativeModules } from 'react-native'; import type {Node} from 'react'; import { SafeAreaView, @@ -52,7 +53,13 @@ const Section = ({children, title}): Node => { ); }; +const { ActivityStarter } = NativeModules; + const App: () => Node = () => { + useEffect(() => { + ActivityStarter.startAppReadyActivity(); + }, []); + const isDarkMode = useColorScheme() === 'dark'; const backgroundStyle = { diff --git a/performance-tests/TestAppSentry/App.js b/performance-tests/TestAppSentry/App.js index 0133c64368..f0440980c8 100644 --- a/performance-tests/TestAppSentry/App.js +++ b/performance-tests/TestAppSentry/App.js @@ -6,7 +6,8 @@ * @flow strict-local */ -import React from 'react'; +import React, { useEffect } from 'react'; +import { NativeModules } from 'react-native'; import type {Node} from 'react'; import { SafeAreaView, @@ -58,7 +59,13 @@ const Section = ({children, title}): Node => { ); }; +const { ActivityStarter } = NativeModules; + const App: () => Node = () => { + useEffect(() => { + ActivityStarter.startAppReadyActivity(); + }, []); + const isDarkMode = useColorScheme() === 'dark'; const backgroundStyle = { From 0bc61ca4f5770a5dc7afe1682d5fbaeadaf8db22 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 17:16:02 +0200 Subject: [PATCH 03/35] Measure startup time with the AppReadyActivity --- performance-tests/metrics-android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index 04d4333eae..75d6e03ec7 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -1,9 +1,9 @@ apps: - name: com.testappplain - activity: MainActivity + activity: AppReadyActivity path: TestAppPlain/android/app/build/outputs/apk/release/app-release.apk - name: com.testappsentry - activity: MainActivity + activity: AppReadyActivity path: TestAppSentry/android/app/build/outputs/apk/release/app-release.apk startupTimeTest: From 0a810f034f528547eaae9f12ff75deca87ab1910 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 17:16:52 +0200 Subject: [PATCH 04/35] Reset diffMin workaround introduced with #4159 --- performance-tests/metrics-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index 75d6e03ec7..aef5022a6b 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -8,7 +8,7 @@ apps: startupTimeTest: runs: 50 - diffMin: -20 + diffMin: 0 diffMax: 150 binarySizeTest: From 1cc99e0463633a43f56802aaa2062a9cfe2c1fdb Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 17:51:28 +0200 Subject: [PATCH 05/35] Start activity only on Android --- performance-tests/TestAppPlain/App.js | 4 +++- performance-tests/TestAppSentry/App.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppPlain/App.js index d341425e6e..7fbde7f5be 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppPlain/App.js @@ -57,7 +57,9 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { - ActivityStarter.startAppReadyActivity(); + if (Platform.OS === 'android') { + ActivityStarter.startAppReadyActivity(); + } }, []); const isDarkMode = useColorScheme() === 'dark'; diff --git a/performance-tests/TestAppSentry/App.js b/performance-tests/TestAppSentry/App.js index f0440980c8..55baf96c53 100644 --- a/performance-tests/TestAppSentry/App.js +++ b/performance-tests/TestAppSentry/App.js @@ -63,7 +63,9 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { - ActivityStarter.startAppReadyActivity(); + if (Platform.OS === 'android') { + ActivityStarter.startAppReadyActivity(); + } }, []); const isDarkMode = useColorScheme() === 'dark'; From c8ede29177019c79b99176ceaa578ebe8c097749 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 17:51:58 +0200 Subject: [PATCH 06/35] Don't close the activity to avoid any delay --- .../com/testappplain/AppReadyActivity.java | 31 ++++++++++++------- .../com/testappsentry/AppReadyActivity.java | 31 ++++++++++++------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java index 003b93d5db..27a1c98316 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java @@ -1,7 +1,10 @@ package com.testappplain; import android.os.Bundle; -import android.os.Handler; +import android.view.Gravity; +import android.view.ViewGroup.LayoutParams; +import android.widget.LinearLayout; +import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; public class AppReadyActivity extends AppCompatActivity { @@ -9,17 +12,21 @@ public class AppReadyActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(android.R.layout.simple_list_item_1); // An empty view + // Create a LinearLayout to hold the TextView + LinearLayout layout = new LinearLayout(this); + layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + layout.setGravity(Gravity.CENTER); - // Close the activity after 1 second - new Handler() - .postDelayed( - new Runnable() { - @Override - public void run() { - finish(); - } - }, - 1000); + // Create a TextView with the text "App Ready" + TextView textView = new TextView(this); + textView.setText("The App is fully loaded!\nTap/swipe back to close this view."); + textView.setTextSize(24); // Set text size + textView.setGravity(Gravity.CENTER); + + // Add the TextView to the LinearLayout + layout.addView(textView); + + // Set the LinearLayout as the content view + setContentView(layout); } } diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java index 418376f80f..43bdfe8fd0 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java @@ -1,7 +1,10 @@ package com.testappsentry; import android.os.Bundle; -import android.os.Handler; +import android.view.Gravity; +import android.view.ViewGroup.LayoutParams; +import android.widget.LinearLayout; +import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; public class AppReadyActivity extends AppCompatActivity { @@ -9,17 +12,21 @@ public class AppReadyActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(android.R.layout.simple_list_item_1); // An empty view + // Create a LinearLayout to hold the TextView + LinearLayout layout = new LinearLayout(this); + layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); + layout.setGravity(Gravity.CENTER); - // Close the activity after 1 second - new Handler() - .postDelayed( - new Runnable() { - @Override - public void run() { - finish(); - } - }, - 1000); + // Create a TextView with the text "App Ready" + TextView textView = new TextView(this); + textView.setText("The App is fully loaded!\nTap/swipe back to close this view."); + textView.setTextSize(24); // Set text size + textView.setGravity(Gravity.CENTER); + + // Add the TextView to the LinearLayout + layout.addView(textView); + + // Set the LinearLayout as the content view + setContentView(layout); } } From 8bdc153fe1d205b6b685dc87e0ac2bfd57d82259 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 18:28:21 +0200 Subject: [PATCH 07/35] Remove unneeded comments --- .../main/java/com/testappplain/AppReadyActivity.java | 10 ++-------- .../main/java/com/testappsentry/AppReadyActivity.java | 10 ++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java index 27a1c98316..005ed5226a 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/AppReadyActivity.java @@ -12,21 +12,15 @@ public class AppReadyActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - // Create a LinearLayout to hold the TextView + // Add a simple text saying that the app is fully loaded LinearLayout layout = new LinearLayout(this); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); layout.setGravity(Gravity.CENTER); - - // Create a TextView with the text "App Ready" TextView textView = new TextView(this); textView.setText("The App is fully loaded!\nTap/swipe back to close this view."); - textView.setTextSize(24); // Set text size + textView.setTextSize(24); textView.setGravity(Gravity.CENTER); - - // Add the TextView to the LinearLayout layout.addView(textView); - - // Set the LinearLayout as the content view setContentView(layout); } } diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java index 43bdfe8fd0..05c7ffda19 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/AppReadyActivity.java @@ -12,21 +12,15 @@ public class AppReadyActivity extends AppCompatActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - // Create a LinearLayout to hold the TextView + // Add a simple text saying that the app is fully loaded LinearLayout layout = new LinearLayout(this); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); layout.setGravity(Gravity.CENTER); - - // Create a TextView with the text "App Ready" TextView textView = new TextView(this); textView.setText("The App is fully loaded!\nTap/swipe back to close this view."); - textView.setTextSize(24); // Set text size + textView.setTextSize(24); textView.setGravity(Gravity.CENTER); - - // Add the TextView to the LinearLayout layout.addView(textView); - - // Set the LinearLayout as the content view setContentView(layout); } } From b735f2bf4c3a137e8a5db271737fdd060fbb05d0 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 19 Nov 2024 18:33:04 +0200 Subject: [PATCH 08/35] Cleanup --- .../app/src/main/java/com/testappplain/MainApplication.java | 3 ++- .../app/src/main/java/com/testappsentry/MainApplication.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java index beaf4e0216..8ef513bac5 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainApplication.java @@ -27,7 +27,8 @@ public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } - ReactPackage appReadyPackage = new ReactPackage() { // Register the package + ReactPackage appReadyPackage = + new ReactPackage() { @Override public List createNativeModules(ReactApplicationContext reactContext) { return Arrays.asList(new AppReadyModule(reactContext)); diff --git a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java index 5eee67c1f7..68c2d32288 100644 --- a/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java +++ b/performance-tests/TestAppSentry/android/app/src/main/java/com/testappsentry/MainApplication.java @@ -27,7 +27,8 @@ public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } - ReactPackage appReadyPackage = new ReactPackage() { // Register the package + ReactPackage appReadyPackage = + new ReactPackage() { @Override public List createNativeModules(ReactApplicationContext reactContext) { return Arrays.asList(new AppReadyModule(reactContext)); From 219696a23a560f8e415b7cd8a3fd90f7272c0ea7 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 12:30:34 +0200 Subject: [PATCH 09/35] Point to updated StartupTimeTest --- .github/workflows/e2e.yml | 2 +- performance-tests/metrics-android.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index be710af944..dd9c93082e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: getsentry/action-app-sdk-overhead-metrics@v1 + uses: antonis/action-app-sdk-overhead-metrics@96b773fd2ce9748b6aa3c0e46a0d33cbf28289a4 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index aef5022a6b..70e70f6c1d 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -1,9 +1,11 @@ apps: - name: com.testappplain - activity: AppReadyActivity + activity: MainActivity + measureActivity: AppReadyActivity path: TestAppPlain/android/app/build/outputs/apk/release/app-release.apk - name: com.testappsentry - activity: AppReadyActivity + activity: MainActivity + measureActivity: AppReadyActivity path: TestAppSentry/android/app/build/outputs/apk/release/app-release.apk startupTimeTest: From 8b09d830b495571b069b16b0f70c40f58d1a7567 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 12:54:24 +0200 Subject: [PATCH 10/35] Updates metrics library hash --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index dd9c93082e..5717105c37 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@96b773fd2ce9748b6aa3c0e46a0d33cbf28289a4 + uses: antonis/action-app-sdk-overhead-metrics@7139302468aba1de8fe46106e25fd615598b258b with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From dd6d67473fd9eb4918ff2368bbe5470ba895d023 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 13:59:04 +0200 Subject: [PATCH 11/35] Update metrics lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5717105c37..dff88f44d5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@7139302468aba1de8fe46106e25fd615598b258b + uses: antonis/action-app-sdk-overhead-metrics@c46a9cf699d66e2b99ef76532cf1436f91883ec3 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From f96d7d38d0d7e5914cdbbb61a425f7706d2c3820 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 14:18:50 +0200 Subject: [PATCH 12/35] Update metric lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index dff88f44d5..72da461afe 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@c46a9cf699d66e2b99ef76532cf1436f91883ec3 + uses: antonis/action-app-sdk-overhead-metrics@c2e06db2ef22279429c2d858f77d5ef82943f6be with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 77e143719a8caeba445c1a36de060f4e9a3f3681 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 15:00:04 +0200 Subject: [PATCH 13/35] Update metrics lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 72da461afe..9f9ec94dce 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@c2e06db2ef22279429c2d858f77d5ef82943f6be + uses: antonis/action-app-sdk-overhead-metrics@7cc7951f883b101127a7d1466efc34dcd586a7be with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From b13c465ab0d0bb99d7626910bd99b56028e3032d Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 15:27:08 +0200 Subject: [PATCH 14/35] update metrics lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9f9ec94dce..672d35081b 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@7cc7951f883b101127a7d1466efc34dcd586a7be + uses: antonis/action-app-sdk-overhead-metrics@b625ac8dc220e111955eed4327b5715e4e766d70 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From cbfe08bd4be389bee417418aa02d9a2ca1f29707 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 15:55:10 +0200 Subject: [PATCH 15/35] Update metric lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 672d35081b..0226f9da24 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@b625ac8dc220e111955eed4327b5715e4e766d70 + uses: antonis/action-app-sdk-overhead-metrics@5749115863261dcaf107d075e5ef9456b0530aa9 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 4f04935f419943f1964bc937ff5de724acd8645f Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 16:48:45 +0200 Subject: [PATCH 16/35] Update metrics lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0226f9da24..98500a9feb 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@5749115863261dcaf107d075e5ef9456b0530aa9 + uses: antonis/action-app-sdk-overhead-metrics@8eb0fc27bf496ca02e2ee9eb1d8561ef577897c8 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From a3f2ea9346c2752e3cf65f6b2e4242805a846310 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 17:04:06 +0200 Subject: [PATCH 17/35] update metric lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 98500a9feb..d2d2034719 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@8eb0fc27bf496ca02e2ee9eb1d8561ef577897c8 + uses: antonis/action-app-sdk-overhead-metrics@9b2b2ba9082b219f696ddaf01d905f85e8f2f597 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 23bbdf651c2f0ed2c1503d5b6fda9a62bffc161d Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 17:42:24 +0200 Subject: [PATCH 18/35] Update metrics lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d2d2034719..9f6e43fc15 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@9b2b2ba9082b219f696ddaf01d905f85e8f2f597 + uses: antonis/action-app-sdk-overhead-metrics@a66d42b3a41410b242cfc867f88f9418f5cc2d25 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From f48e5a068399dee450f2ecb81aef303c3221ce3b Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 19:37:52 +0200 Subject: [PATCH 19/35] Update metric lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9f6e43fc15..928f3515af 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@a66d42b3a41410b242cfc867f88f9418f5cc2d25 + uses: antonis/action-app-sdk-overhead-metrics@50061730f118a2e9b8e3f08cb1a6f3a5b60c25e8 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 25eccc7ac1371689f1572325b00220cbcfbb0e87 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 19:57:55 +0200 Subject: [PATCH 20/35] Update metrics lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 928f3515af..ed234f6b91 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@50061730f118a2e9b8e3f08cb1a6f3a5b60c25e8 + uses: antonis/action-app-sdk-overhead-metrics@9d08e8cda287b6d101dfa07b782b8c415147eacc with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From a139043af634a33846d70aa6aade3fc5d3b2ed96 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Wed, 20 Nov 2024 20:43:55 +0200 Subject: [PATCH 21/35] Log app is ready at timestamp (ms) --- performance-tests/TestAppPlain/App.js | 7 ++++--- performance-tests/metrics-android.yml | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppPlain/App.js index 7fbde7f5be..2596e70392 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppPlain/App.js @@ -57,9 +57,10 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { - if (Platform.OS === 'android') { - ActivityStarter.startAppReadyActivity(); - } + // if (Platform.OS === 'android') { + // ActivityStarter.startAppReadyActivity(); + // } + console.log('AppReadyTimestampMs:', Date.now()); }, []); const isDarkMode = useColorScheme() === 'dark'; diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index 70e70f6c1d..98226a3c01 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -1,7 +1,6 @@ apps: - name: com.testappplain activity: MainActivity - measureActivity: AppReadyActivity path: TestAppPlain/android/app/build/outputs/apk/release/app-release.apk - name: com.testappsentry activity: MainActivity From c95b8191733c34ccc4915fde94d7632e1f6a1654 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 21 Nov 2024 11:17:34 +0200 Subject: [PATCH 22/35] Log app ready timestamp --- .github/workflows/e2e.yml | 2 +- performance-tests/TestAppPlain/App.js | 7 +++---- performance-tests/TestAppSentry/App.js | 2 +- performance-tests/metrics-android.yml | 3 ++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ed234f6b91..50b896a45e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@9d08e8cda287b6d101dfa07b782b8c415147eacc + uses: antonis/action-app-sdk-overhead-metrics@3ccd62f6d212014ab9dc23a4c5e3dddb67f655bf with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppPlain/App.js index 2596e70392..40045b951b 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppPlain/App.js @@ -57,10 +57,9 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { - // if (Platform.OS === 'android') { - // ActivityStarter.startAppReadyActivity(); - // } - console.log('AppReadyTimestampMs:', Date.now()); + if (Platform.OS === 'android') { + console.log('AppReadyTimestampMs:', Date.now()); + } }, []); const isDarkMode = useColorScheme() === 'dark'; diff --git a/performance-tests/TestAppSentry/App.js b/performance-tests/TestAppSentry/App.js index 55baf96c53..c1fd41882f 100644 --- a/performance-tests/TestAppSentry/App.js +++ b/performance-tests/TestAppSentry/App.js @@ -64,7 +64,7 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { if (Platform.OS === 'android') { - ActivityStarter.startAppReadyActivity(); + console.log('AppReadyTimestampMs:', Date.now()); } }, []); diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index 98226a3c01..0553cc2220 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -1,10 +1,11 @@ apps: - name: com.testappplain activity: MainActivity + logLoadedTimestampRegex: "'AppReadyTimestampMs:',\\s*(\\d+)" path: TestAppPlain/android/app/build/outputs/apk/release/app-release.apk - name: com.testappsentry activity: MainActivity - measureActivity: AppReadyActivity + logLoadedTimestampRegex: "'AppReadyTimestampMs:',\\s*(\\d+)" path: TestAppSentry/android/app/build/outputs/apk/release/app-release.apk startupTimeTest: From 33744f2bdbab24c743b4d6d3ecf6381747a67fa2 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 21 Nov 2024 11:41:44 +0200 Subject: [PATCH 23/35] Update log format --- performance-tests/TestAppPlain/App.js | 2 +- performance-tests/TestAppSentry/App.js | 2 +- performance-tests/metrics-android.yml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppPlain/App.js index 40045b951b..1efb77a532 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppPlain/App.js @@ -58,7 +58,7 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { if (Platform.OS === 'android') { - console.log('AppReadyTimestampMs:', Date.now()); + console.log('AppReadyTimestampMs='+Date.now()); } }, []); diff --git a/performance-tests/TestAppSentry/App.js b/performance-tests/TestAppSentry/App.js index c1fd41882f..8526d146a1 100644 --- a/performance-tests/TestAppSentry/App.js +++ b/performance-tests/TestAppSentry/App.js @@ -64,7 +64,7 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { if (Platform.OS === 'android') { - console.log('AppReadyTimestampMs:', Date.now()); + console.log('AppReadyTimestampMs='+Date.now()); } }, []); diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index 0553cc2220..20d8bac038 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -1,11 +1,11 @@ apps: - name: com.testappplain activity: MainActivity - logLoadedTimestampRegex: "'AppReadyTimestampMs:',\\s*(\\d+)" + logLoadedTimestampRegex: AppReadyTimestampMs=(\d+) path: TestAppPlain/android/app/build/outputs/apk/release/app-release.apk - name: com.testappsentry activity: MainActivity - logLoadedTimestampRegex: "'AppReadyTimestampMs:',\\s*(\\d+)" + logLoadedTimestampRegex: AppReadyTimestampMs=(\d+) path: TestAppSentry/android/app/build/outputs/apk/release/app-release.apk startupTimeTest: From ab8b897244bffeed0c89e357fa02cae345ff40f0 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 21 Nov 2024 11:54:38 +0200 Subject: [PATCH 24/35] update metrics lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 50b896a45e..01c2f2c0a0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@3ccd62f6d212014ab9dc23a4c5e3dddb67f655bf + uses: antonis/action-app-sdk-overhead-metrics@0d95fe3ff2eeb953dba750cd2a078bf3c1a91499 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 6aac156e54cfc1abad30ec1f70f32c1c19c69d38 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 21 Nov 2024 12:06:40 +0200 Subject: [PATCH 25/35] Update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 01c2f2c0a0..1660844d08 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@0d95fe3ff2eeb953dba750cd2a078bf3c1a91499 + uses: antonis/action-app-sdk-overhead-metrics@4ee260d8b78b9504013208f9a3915e8f11e3629a with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From acf1798929958c9f886dea762445ad928cb15070 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 21 Nov 2024 12:26:12 +0200 Subject: [PATCH 26/35] Update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 1660844d08..9a43c9c6a9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@4ee260d8b78b9504013208f9a3915e8f11e3629a + uses: antonis/action-app-sdk-overhead-metrics@8c1ca3f99a9b2e8b476fa5416a1178ca03c98a04 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From ba01fc93320226e0fbb49fd44072233b37a58f9d Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Thu, 21 Nov 2024 18:50:39 +0200 Subject: [PATCH 27/35] Use appLoadedLog --- .github/workflows/e2e.yml | 2 +- performance-tests/TestAppPlain/App.js | 2 +- performance-tests/TestAppSentry/App.js | 2 +- performance-tests/metrics-android.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 9a43c9c6a9..25076da4aa 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@8c1ca3f99a9b2e8b476fa5416a1178ca03c98a04 + uses: antonis/action-app-sdk-overhead-metrics@2d1a9f67ade9590b88940a77bd15dd4cc8ed2b3a with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppPlain/App.js index 1efb77a532..b51200033f 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppPlain/App.js @@ -58,7 +58,7 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { if (Platform.OS === 'android') { - console.log('AppReadyTimestampMs='+Date.now()); + console.log('AppIsLoaded'); } }, []); diff --git a/performance-tests/TestAppSentry/App.js b/performance-tests/TestAppSentry/App.js index 8526d146a1..fe45ce17c0 100644 --- a/performance-tests/TestAppSentry/App.js +++ b/performance-tests/TestAppSentry/App.js @@ -64,7 +64,7 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { if (Platform.OS === 'android') { - console.log('AppReadyTimestampMs='+Date.now()); + console.log('AppIsLoaded'); } }, []); diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index 20d8bac038..5757250fc7 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -1,11 +1,11 @@ apps: - name: com.testappplain activity: MainActivity - logLoadedTimestampRegex: AppReadyTimestampMs=(\d+) + appLoadedLog: AppIsLoaded path: TestAppPlain/android/app/build/outputs/apk/release/app-release.apk - name: com.testappsentry activity: MainActivity - logLoadedTimestampRegex: AppReadyTimestampMs=(\d+) + appLoadedLog: AppIsLoaded path: TestAppSentry/android/app/build/outputs/apk/release/app-release.apk startupTimeTest: From b8f793e55f0bf6610dc1077fb35bedb6415fdea8 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 22 Nov 2024 17:02:58 +0200 Subject: [PATCH 28/35] Try useAppWaitActivity --- .github/workflows/e2e.yml | 2 +- performance-tests/TestAppPlain/App.js | 2 +- performance-tests/TestAppSentry/App.js | 2 +- performance-tests/metrics-android.yml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 25076da4aa..2b9399e2f0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@2d1a9f67ade9590b88940a77bd15dd4cc8ed2b3a + uses: antonis/action-app-sdk-overhead-metrics@d58ec891257087dd74999387be6fcd8008274aac with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml diff --git a/performance-tests/TestAppPlain/App.js b/performance-tests/TestAppPlain/App.js index b51200033f..7fbde7f5be 100644 --- a/performance-tests/TestAppPlain/App.js +++ b/performance-tests/TestAppPlain/App.js @@ -58,7 +58,7 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { if (Platform.OS === 'android') { - console.log('AppIsLoaded'); + ActivityStarter.startAppReadyActivity(); } }, []); diff --git a/performance-tests/TestAppSentry/App.js b/performance-tests/TestAppSentry/App.js index fe45ce17c0..55baf96c53 100644 --- a/performance-tests/TestAppSentry/App.js +++ b/performance-tests/TestAppSentry/App.js @@ -64,7 +64,7 @@ const { ActivityStarter } = NativeModules; const App: () => Node = () => { useEffect(() => { if (Platform.OS === 'android') { - console.log('AppIsLoaded'); + ActivityStarter.startAppReadyActivity(); } }, []); diff --git a/performance-tests/metrics-android.yml b/performance-tests/metrics-android.yml index 5757250fc7..70e70f6c1d 100644 --- a/performance-tests/metrics-android.yml +++ b/performance-tests/metrics-android.yml @@ -1,11 +1,11 @@ apps: - name: com.testappplain activity: MainActivity - appLoadedLog: AppIsLoaded + measureActivity: AppReadyActivity path: TestAppPlain/android/app/build/outputs/apk/release/app-release.apk - name: com.testappsentry activity: MainActivity - appLoadedLog: AppIsLoaded + measureActivity: AppReadyActivity path: TestAppSentry/android/app/build/outputs/apk/release/app-release.apk startupTimeTest: From 0be394e6efddf1f0cef01c609ae78f20da150522 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 22 Nov 2024 17:17:30 +0200 Subject: [PATCH 29/35] Update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2b9399e2f0..86f35d5f97 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@d58ec891257087dd74999387be6fcd8008274aac + uses: antonis/action-app-sdk-overhead-metrics@de7fe6715a6e776a5007e2973b716bde8a4182df with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 54745a0ca347ad05bc85197997489628d9d299c7 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 22 Nov 2024 17:49:48 +0200 Subject: [PATCH 30/35] Update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 86f35d5f97..070c336ff7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@de7fe6715a6e776a5007e2973b716bde8a4182df + uses: antonis/action-app-sdk-overhead-metrics@33a0dd79f75a07826d56017970ab8987d70104fe with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 471b5144b41852c1fb1c80ef1fdd4e882936556b Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 22 Nov 2024 17:59:22 +0200 Subject: [PATCH 31/35] update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 070c336ff7..77b56af4a3 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@33a0dd79f75a07826d56017970ab8987d70104fe + uses: antonis/action-app-sdk-overhead-metrics@dad19f9586c23a1c6edfe858d5e572063e40f495 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 337e334e8db1299727e4ed4fd39fd625ceeb59d6 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 3 Dec 2024 17:42:25 +0200 Subject: [PATCH 32/35] Update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ea1f7b84e6..aeb3a29953 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@dad19f9586c23a1c6edfe858d5e572063e40f495 + uses: antonis/action-app-sdk-overhead-metrics@09ffc6b2a52fa708dd4c515b184eb2ef87bd11b3 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 7ffb6304bd5d28e6156010b8e78a2b6f13b25347 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 3 Dec 2024 17:52:25 +0200 Subject: [PATCH 33/35] Update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index aeb3a29953..6ee2866bb0 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@09ffc6b2a52fa708dd4c515b184eb2ef87bd11b3 + uses: antonis/action-app-sdk-overhead-metrics@4b88eecf5a13e37bdf5e48af90f3d2b3db48cef5 with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 59eeeb33593c16591dbf70d9cb609bc022eb20df Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 3 Dec 2024 18:09:32 +0200 Subject: [PATCH 34/35] Update lib --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6ee2866bb0..2cba775fa5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -140,7 +140,7 @@ jobs: MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} - name: Collect apps metrics - uses: antonis/action-app-sdk-overhead-metrics@4b88eecf5a13e37bdf5e48af90f3d2b3db48cef5 + uses: antonis/action-app-sdk-overhead-metrics@67d7579b9398ac756bcf2cd5693782ca4b02a92f with: name: ${{ matrix.name }} (${{ matrix.rn-architecture }}) config: ./performance-tests/metrics-${{ matrix.platform }}.yml From 8814472a146ea9fc244063472357aad0aa3d1196 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Tue, 3 Dec 2024 18:35:20 +0200 Subject: [PATCH 35/35] Launch AppReadyActivity manually for testing --- .../app/src/main/java/com/testappplain/MainActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.java b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.java index 3e1bac8e05..4d6468c286 100644 --- a/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.java +++ b/performance-tests/TestAppPlain/android/app/src/main/java/com/testappplain/MainActivity.java @@ -15,6 +15,14 @@ protected String getMainComponentName() { return "TestAppPlain"; } + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + Intent intent = new Intent(this, AppReadyActivity.class); + startActivity(intent); + } + /** * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer