From 6ff05cac637858813d32f811d0c5acba0d32fee2 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Mon, 23 Sep 2024 13:23:40 +0200 Subject: [PATCH 01/13] describe built-in firebase metrics --- contributingGuides/FIREBASE.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 contributingGuides/FIREBASE.md diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md new file mode 100644 index 000000000000..9d27225c429b --- /dev/null +++ b/contributingGuides/FIREBASE.md @@ -0,0 +1,28 @@ +# Firebase Integration + +This project uses Firebase for gathering information about performance and crashes. + +## Performance Metrics + +The following table shows the metrics that are being tracked. + +| Metric name | Description | Start time | End time | +|----------|----------|----------|----------| +| `_app_start` | **[ANDROID ONLY]** The time between when the user opens the app and when the app is responsive. | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | +| `_app_in_foreground` | The time when the app is running in the foreground and available to the user. | Starts when the first activity to reach the foreground has its `onResume()` method called. | Stops when the last activity to leave the foreground has its `onStop()` method called. | +| `_app_in_background` | Time when the app is running in the background. | Starts when the last activity to leave the foreground has its `onStop()` method called. | Stops when the first activity to reach the foreground has its `onResume()` method called. | +| `homepage_initial_render` | Data | Data | Data | +| `calc_most_recent_last_modified_action` | Data | Data | Data | +| `chat_render` | Data | Data | Data | +| `load_search_options` | Data | Data | Data | +| `js_loaded` | Data | Data | Data | +| `search_filter_options` | Data | Data | Data | +| `open_report_thread` | Data | Data | Data | +| `open_report_from_preview` | Data | Data | Data | +| `switch_report_from_preview` | Data | Data | Data | +| `switch_report` | Data | Data | Data | +| `search_render` | Data | Data | Data | +| `trie_initialization` | Data | Data | Data | + + + From 02dd0fef77585f65ebb516c538e02d141490711a Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Mon, 23 Sep 2024 13:29:36 +0200 Subject: [PATCH 02/13] describe default metrics for both platforms --- contributingGuides/FIREBASE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md index 9d27225c429b..11bf6d28f36f 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/FIREBASE.md @@ -9,8 +9,8 @@ The following table shows the metrics that are being tracked. | Metric name | Description | Start time | End time | |----------|----------|----------|----------| | `_app_start` | **[ANDROID ONLY]** The time between when the user opens the app and when the app is responsive. | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | -| `_app_in_foreground` | The time when the app is running in the foreground and available to the user. | Starts when the first activity to reach the foreground has its `onResume()` method called. | Stops when the last activity to leave the foreground has its `onStop()` method called. | -| `_app_in_background` | Time when the app is running in the background. | Starts when the last activity to leave the foreground has its `onStop()` method called. | Stops when the first activity to reach the foreground has its `onResume()` method called. | +| `_app_in_foreground` | The time when the app is running in the foreground and available to the user. | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | +| `_app_in_background` | Time when the app is running in the background. | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | | `homepage_initial_render` | Data | Data | Data | | `calc_most_recent_last_modified_action` | Data | Data | Data | | `chat_render` | Data | Data | Data | From 9e07742af295948967128c50d785db9cfa3c4c58 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Mon, 23 Sep 2024 14:33:26 +0200 Subject: [PATCH 03/13] describe js_loaded metric --- contributingGuides/FIREBASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md index 11bf6d28f36f..33313f872026 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/FIREBASE.md @@ -15,7 +15,7 @@ The following table shows the metrics that are being tracked. | `calc_most_recent_last_modified_action` | Data | Data | Data | | `chat_render` | Data | Data | Data | | `load_search_options` | Data | Data | Data | -| `js_loaded` | Data | Data | Data | +| `js_loaded` | The time it takes for the JavaScript bundle to load. | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | | `search_filter_options` | Data | Data | Data | | `open_report_thread` | Data | Data | Data | | `open_report_from_preview` | Data | Data | Data | From cce3ef77cf07294a478c16b16ef9424705f41c5d Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Mon, 23 Sep 2024 14:35:23 +0200 Subject: [PATCH 04/13] add additional resources --- contributingGuides/FIREBASE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md index 33313f872026..6d0803740fda 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/FIREBASE.md @@ -25,4 +25,8 @@ The following table shows the metrics that are being tracked. | `trie_initialization` | Data | Data | Data | +## Additional Resources +- [Firebase Documentation](https://firebase.google.com/docs) +- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon) +- [Firebase Crashlytics](https://firebase.google.com/docs/crashlytics) \ No newline at end of file From 1944fef103291c67bae1e0b2b7896bf506ec5d15 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Tue, 24 Sep 2024 11:19:24 +0200 Subject: [PATCH 05/13] all firebase metrics described --- contributingGuides/FIREBASE.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md index 6d0803740fda..9bd30cf35211 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/FIREBASE.md @@ -11,18 +11,18 @@ The following table shows the metrics that are being tracked. | `_app_start` | **[ANDROID ONLY]** The time between when the user opens the app and when the app is responsive. | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | | `_app_in_foreground` | The time when the app is running in the foreground and available to the user. | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | | `_app_in_background` | Time when the app is running in the background. | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | -| `homepage_initial_render` | Data | Data | Data | -| `calc_most_recent_last_modified_action` | Data | Data | Data | -| `chat_render` | Data | Data | Data | -| `load_search_options` | Data | Data | Data | +| `homepage_initial_render` | Time taken for the initial render of the app for a logged in user. | Starts at the beginning of the initial render of the app. | Stops at the end of the initial render process. | +| `calc_most_recent_last_modified_action` | Time taken to find the most recently modified report action or report. | Starts when the app reconnects to **the** network | Ends when the app reconnects to the network and the most recent report action or report is found. | +| `chat_render` | Time taken to render the Report screen. | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | +| `load_search_options` | Time taken to generate the list of options used in Chat Finder. | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. | | `js_loaded` | The time it takes for the JavaScript bundle to load. | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | -| `search_filter_options` | Data | Data | Data | -| `open_report_thread` | Data | Data | Data | -| `open_report_from_preview` | Data | Data | Data | -| `switch_report_from_preview` | Data | Data | Data | -| `switch_report` | Data | Data | Data | -| `search_render` | Data | Data | Data | -| `trie_initialization` | Data | Data | Data | +| `search_filter_options` | Time taken to filter search options in Chat Finder by given search value. | Starts when user types something in the Chat Finder search input. | Stops when the list of filtered options is generated. | +| `open_report_thread` | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | +| `open_report_from_preview` | Time taken to open a report from preview.

(previously `switch_report_from_preview`) | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | +| `switch_report_from_preview` | **[REMOVED]** Time taken to open a report from preview. | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | +| `switch_report` | Time taken to open report. | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | +| `search_render` | Time taken to render the Chat Finder page. | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | +| `trie_initialization` | Time taken to build the emoji trie. | Starts when emoji trie begins to build. | Stops when emoji trie building is complete. | ## Additional Resources From 465ed4968036f88591614813ce3adf775e665a46 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Wed, 25 Sep 2024 11:55:56 +0200 Subject: [PATCH 06/13] add "Sent to Firebase" column --- contributingGuides/FIREBASE.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md index 9bd30cf35211..5283a8b25f2a 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/FIREBASE.md @@ -6,23 +6,23 @@ This project uses Firebase for gathering information about performance and crash The following table shows the metrics that are being tracked. -| Metric name | Description | Start time | End time | -|----------|----------|----------|----------| -| `_app_start` | **[ANDROID ONLY]** The time between when the user opens the app and when the app is responsive. | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | -| `_app_in_foreground` | The time when the app is running in the foreground and available to the user. | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | -| `_app_in_background` | Time when the app is running in the background. | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | -| `homepage_initial_render` | Time taken for the initial render of the app for a logged in user. | Starts at the beginning of the initial render of the app. | Stops at the end of the initial render process. | -| `calc_most_recent_last_modified_action` | Time taken to find the most recently modified report action or report. | Starts when the app reconnects to **the** network | Ends when the app reconnects to the network and the most recent report action or report is found. | -| `chat_render` | Time taken to render the Report screen. | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | -| `load_search_options` | Time taken to generate the list of options used in Chat Finder. | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. | -| `js_loaded` | The time it takes for the JavaScript bundle to load. | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | -| `search_filter_options` | Time taken to filter search options in Chat Finder by given search value. | Starts when user types something in the Chat Finder search input. | Stops when the list of filtered options is generated. | -| `open_report_thread` | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | -| `open_report_from_preview` | Time taken to open a report from preview.

(previously `switch_report_from_preview`) | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | -| `switch_report_from_preview` | **[REMOVED]** Time taken to open a report from preview. | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | -| `switch_report` | Time taken to open report. | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | -| `search_render` | Time taken to render the Chat Finder page. | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | -| `trie_initialization` | Time taken to build the emoji trie. | Starts when emoji trie begins to build. | Stops when emoji trie building is complete. | +| Metric name | Sent to Firebase | Description | Start time | End time | +|----------|----------|----------|----------|----------| +| `_app_start` | ✅ | **[ANDROID ONLY]** The time between when the user opens the app and when the app is responsive. | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | +| `_app_in_foreground` | ✅ | The time when the app is running in the foreground and available to the user. | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | +| `_app_in_background` | ✅ | Time when the app is running in the background. | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | +| `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user. | Starts at the beginning of the initial render of the app. | Stops at the end of the initial render process. | +| `calc_most_recent_last_modified_action` | ✅ | Time taken to find the most recently modified report action or report. | Starts when the app reconnects to **the** network | Ends when the app reconnects to the network and the most recent report action or report is found. | +| `chat_render` | ✅ | Time taken to render the Report screen. | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | +| `load_search_options` | ✅ | Time taken to generate the list of options used in Chat Finder. | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. | +| `js_loaded` | ✅ | The time it takes for the JavaScript bundle to load. | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | +| `search_filter_options` | ✅ | Time taken to filter search options in Chat Finder by given search value. | Starts when user types something in the Chat Finder search input. | Stops when the list of filtered options is generated. | +| `open_report_thread` | ✅ | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | +| `open_report_from_preview` | ✅ | Time taken to open a report from preview.

(previously `switch_report_from_preview`) | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | +| `switch_report_from_preview` | ❌ | **[REMOVED]** Time taken to open a report from preview. | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | +| `switch_report` | ✅ | Time taken to open report. | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | +| `search_render` | ✅ | Time taken to render the Chat Finder page. | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | +| `trie_initialization` | ✅ | Time taken to build the emoji trie. | Starts when emoji trie begins to build. | Stops when emoji trie building is complete. | ## Additional Resources From 05c248b9f3056813f38d2f6e4f2f3f9affec8350 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Wed, 25 Sep 2024 12:57:37 +0200 Subject: [PATCH 07/13] describe all non-firebase metrics --- contributingGuides/FIREBASE.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md index 5283a8b25f2a..f3110d93f004 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/FIREBASE.md @@ -9,20 +9,23 @@ The following table shows the metrics that are being tracked. | Metric name | Sent to Firebase | Description | Start time | End time | |----------|----------|----------|----------|----------| | `_app_start` | ✅ | **[ANDROID ONLY]** The time between when the user opens the app and when the app is responsive. | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | +| `js_loaded` | ✅ | The time it takes for the JavaScript bundle to load. | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | | `_app_in_foreground` | ✅ | The time when the app is running in the foreground and available to the user. | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | | `_app_in_background` | ✅ | Time when the app is running in the background. | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | | `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user. | Starts at the beginning of the initial render of the app. | Stops at the end of the initial render process. | +| `sidebar_loaded` | ❌ | Time taken for the Sidebar to load. | Starts when the Sidebar is mounted. | Stops when the Splash Screen is hidden. | | `calc_most_recent_last_modified_action` | ✅ | Time taken to find the most recently modified report action or report. | Starts when the app reconnects to **the** network | Ends when the app reconnects to the network and the most recent report action or report is found. | -| `chat_render` | ✅ | Time taken to render the Report screen. | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | +| `search_render` | ✅ | Time taken to render the Chat Finder page. | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | | `load_search_options` | ✅ | Time taken to generate the list of options used in Chat Finder. | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. | -| `js_loaded` | ✅ | The time it takes for the JavaScript bundle to load. | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | | `search_filter_options` | ✅ | Time taken to filter search options in Chat Finder by given search value. | Starts when user types something in the Chat Finder search input. | Stops when the list of filtered options is generated. | -| `open_report_thread` | ✅ | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | -| `open_report_from_preview` | ✅ | Time taken to open a report from preview.

(previously `switch_report_from_preview`) | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | -| `switch_report_from_preview` | ❌ | **[REMOVED]** Time taken to open a report from preview. | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | -| `switch_report` | ✅ | Time taken to open report. | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | -| `search_render` | ✅ | Time taken to render the Chat Finder page. | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | | `trie_initialization` | ✅ | Time taken to build the emoji trie. | Starts when emoji trie begins to build. | Stops when emoji trie building is complete. | +| `open_report` | ❌ | Time taken to open a report. | Starts when the row in the `LHNOptionsList` is pressed. | Stops when the `ReportActionsList` finishes laying out. | +| `switch_report` | ✅ | Time taken to open report. | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | +| `open_report_from_preview` | ✅ | Time taken to open a report from preview.

(previously `switch_report_from_preview`) | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | +| `chat_render` | ✅ | Time taken to render the Report screen. | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | +| `report_initial_render` | ❌ | Time taken to render the Report screen. | Starts when the first item is rendered in the `LHNOptionsList`. | Stops when the `ReportActionsList` finishes laying out. | +| `open_report_thread` | ✅ | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | +| `message_sent` | ❌ | Time taken to send a message. | Starts when the new message is sent. | Stops when the message is being rendered in the chat. | ## Additional Resources From 85f9b9aa22f4d19d57672536b97f82a6257c8392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Miko=C5=82ajczak?= Date: Wed, 25 Sep 2024 14:25:31 +0200 Subject: [PATCH 08/13] add proposa for Documentation Maintenance paragraph --- contributingGuides/FIREBASE.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/FIREBASE.md index f3110d93f004..3e8d8694ee21 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/FIREBASE.md @@ -27,6 +27,14 @@ The following table shows the metrics that are being tracked. | `open_report_thread` | ✅ | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | | `message_sent` | ❌ | Time taken to send a message. | Starts when the new message is sent. | Stops when the message is being rendered in the chat. | +## Documentation Maintenance: +This documentation must be kept up-to-date as metrics evolve or new features are introduced: +- if new metric is introduced in the codebase, it should be added to the table +- if the name of the marker changed, and the old name is not used anymore, the old name should be marked as removed and point to the new name +- if the marker was removed, it should stay in the table and be marked as removed +- if marker placement has changed in the code its new location should be reflected in the table +- metrics efficiency and correctness should be monitored via analytics tool which uses them (e.g. Firebase) + ## Additional Resources From 9d1b307f98e44eccbbd5d90cbe75661badead8c9 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Wed, 25 Sep 2024 15:11:31 +0200 Subject: [PATCH 09/13] update the performance metrics doc --- .../{FIREBASE.md => PERFORMANCE_METRICS.md} | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) rename contributingGuides/{FIREBASE.md => PERFORMANCE_METRICS.md} (80%) diff --git a/contributingGuides/FIREBASE.md b/contributingGuides/PERFORMANCE_METRICS.md similarity index 80% rename from contributingGuides/FIREBASE.md rename to contributingGuides/PERFORMANCE_METRICS.md index 3e8d8694ee21..e3697c17e54b 100644 --- a/contributingGuides/FIREBASE.md +++ b/contributingGuides/PERFORMANCE_METRICS.md @@ -1,10 +1,12 @@ -# Firebase Integration +# Performance Metrics -This project uses Firebase for gathering information about performance and crashes. +This project tracks various performance metrics to monitor and improve the application's efficiency and user experience. -## Performance Metrics +## Tracked Metrics -The following table shows the metrics that are being tracked. +The following table shows the key performance metrics that are being monitored in the application. + +Project is using Firebase for tracking these metrics. However, not all of them are sent there - some of them are only used internally by the Performance module. | Metric name | Sent to Firebase | Description | Start time | End time | |----------|----------|----------|----------|----------| @@ -27,17 +29,20 @@ The following table shows the metrics that are being tracked. | `open_report_thread` | ✅ | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | | `message_sent` | ❌ | Time taken to send a message. | Starts when the new message is sent. | Stops when the message is being rendered in the chat. | -## Documentation Maintenance: -This documentation must be kept up-to-date as metrics evolve or new features are introduced: -- if new metric is introduced in the codebase, it should be added to the table -- if the name of the marker changed, and the old name is not used anymore, the old name should be marked as removed and point to the new name -- if the marker was removed, it should stay in the table and be marked as removed -- if marker placement has changed in the code its new location should be reflected in the table -- metrics efficiency and correctness should be monitored via analytics tool which uses them (e.g. Firebase) +## Documentation Maintenance + +To ensure this documentation remains accurate and useful, please adhere to the following guidelines when updating performance metrics: + +1. **New Metrics**: When a new metric is introduced in the codebase, add it to the table with all relevant details. + +2. **Metric Renaming**: If a metric is renamed, update the table entry. Mark the old name as deprecated and include a reference to the new name. + +3. **Metric Removal**: If a metric is no longer used, don't delete its entry. Instead, mark it as deprecated in the table and provide a brief explanation. + +4. **Code Location Changes**: If the placement of a metric in the code changes, update the "Start time" and "End time" columns to reflect the new location. ## Additional Resources - [Firebase Documentation](https://firebase.google.com/docs) -- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon) -- [Firebase Crashlytics](https://firebase.google.com/docs/crashlytics) \ No newline at end of file +- [Firebase Performance Monitoring](https://firebase.google.com/docs/perf-mon) \ No newline at end of file From 4439b2dd6f7937755ab6e9b144fb0c7713e5e48d Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Wed, 25 Sep 2024 15:21:32 +0200 Subject: [PATCH 10/13] bring back removed metric --- contributingGuides/PERFORMANCE_METRICS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/contributingGuides/PERFORMANCE_METRICS.md b/contributingGuides/PERFORMANCE_METRICS.md index e3697c17e54b..d7133bdacebf 100644 --- a/contributingGuides/PERFORMANCE_METRICS.md +++ b/contributingGuides/PERFORMANCE_METRICS.md @@ -24,6 +24,7 @@ Project is using Firebase for tracking these metrics. However, not all of them a | `open_report` | ❌ | Time taken to open a report. | Starts when the row in the `LHNOptionsList` is pressed. | Stops when the `ReportActionsList` finishes laying out. | | `switch_report` | ✅ | Time taken to open report. | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | | `open_report_from_preview` | ✅ | Time taken to open a report from preview.

(previously `switch_report_from_preview`) | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | +| `switch_report_from_preview` | ❌ | **[REMOVED]** Time taken to open a report from preview. | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | | `chat_render` | ✅ | Time taken to render the Report screen. | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | | `report_initial_render` | ❌ | Time taken to render the Report screen. | Starts when the first item is rendered in the `LHNOptionsList`. | Stops when the `ReportActionsList` finishes laying out. | | `open_report_thread` | ✅ | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | From 6c0351b2ecd8752738b28d1ac589cfc0d50c0c5d Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Fri, 27 Sep 2024 13:14:26 +0200 Subject: [PATCH 11/13] update descriptions with platforms --- contributingGuides/PERFORMANCE_METRICS.md | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/contributingGuides/PERFORMANCE_METRICS.md b/contributingGuides/PERFORMANCE_METRICS.md index d7133bdacebf..1ae12d283854 100644 --- a/contributingGuides/PERFORMANCE_METRICS.md +++ b/contributingGuides/PERFORMANCE_METRICS.md @@ -10,25 +10,25 @@ Project is using Firebase for tracking these metrics. However, not all of them a | Metric name | Sent to Firebase | Description | Start time | End time | |----------|----------|----------|----------|----------| -| `_app_start` | ✅ | **[ANDROID ONLY]** The time between when the user opens the app and when the app is responsive. | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | -| `js_loaded` | ✅ | The time it takes for the JavaScript bundle to load. | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | -| `_app_in_foreground` | ✅ | The time when the app is running in the foreground and available to the user. | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | -| `_app_in_background` | ✅ | Time when the app is running in the background. | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | -| `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user. | Starts at the beginning of the initial render of the app. | Stops at the end of the initial render process. | -| `sidebar_loaded` | ❌ | Time taken for the Sidebar to load. | Starts when the Sidebar is mounted. | Stops when the Splash Screen is hidden. | -| `calc_most_recent_last_modified_action` | ✅ | Time taken to find the most recently modified report action or report. | Starts when the app reconnects to **the** network | Ends when the app reconnects to the network and the most recent report action or report is found. | -| `search_render` | ✅ | Time taken to render the Chat Finder page. | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | -| `load_search_options` | ✅ | Time taken to generate the list of options used in Chat Finder. | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. | -| `search_filter_options` | ✅ | Time taken to filter search options in Chat Finder by given search value. | Starts when user types something in the Chat Finder search input. | Stops when the list of filtered options is generated. | -| `trie_initialization` | ✅ | Time taken to build the emoji trie. | Starts when emoji trie begins to build. | Stops when emoji trie building is complete. | -| `open_report` | ❌ | Time taken to open a report. | Starts when the row in the `LHNOptionsList` is pressed. | Stops when the `ReportActionsList` finishes laying out. | -| `switch_report` | ✅ | Time taken to open report. | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | -| `open_report_from_preview` | ✅ | Time taken to open a report from preview.

(previously `switch_report_from_preview`) | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | +| `_app_start` | ✅ | The time between when the user opens the app and when the app is responsive.

**Platforms:** Android | Starts when the app's `FirebasePerfProvider` `ContentProvider` completes its `onCreate` method. | Stops when the first activity's `onResume()` method is called. | +| `js_loaded` | ✅ | The time it takes for the JavaScript bundle to load.

**Platforms:** Android, iOS | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | +| `_app_in_foreground` | ✅ | The time when the app is running in the foreground and available to the user.

**Platforms:** Android, iOS | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | +| `_app_in_background` | ✅ | Time when the app is running in the background.

**Platforms:** Android, iOS | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | +| `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user.

**Platforms:** All | Starts at the beginning of the initial render of the app. | Stops at the end of the initial render process. | +| `sidebar_loaded` | ❌ | Time taken for the Sidebar to load.

**Platforms:** All | Starts when the Sidebar is mounted. | Stops when the Splash Screen is hidden. | +| `calc_most_recent_last_modified_action` | ✅ | Time taken to find the most recently modified report action or report.

**Platforms:** All | Starts when the app reconnects to the network | Ends when the app reconnects to the network and the most recent report action or report is found. | +| `search_render` | ✅ | Time taken to render the Chat Finder page.

**Platforms:** All | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | +| `load_search_options` | ✅ | Time taken to generate the list of options used in Chat Finder.

**Platforms:** All | Starts when the `getSearchOptions` function is called. | Stops when the list of available options is generated. | +| `search_filter_options` | ✅ | Time taken to filter search options in Chat Finder by given search value.

**Platforms:** All | Starts when user types something in the Chat Finder search input. | Stops when the list of filtered options is generated. | +| `trie_initialization` | ✅ | Time taken to build the emoji trie.

**Platforms:** All | Starts when emoji trie begins to build. | Stops when emoji trie building is complete. | +| `open_report` | ❌ | Time taken to open a report.

**Platforms:** All | Starts when the row in the `LHNOptionsList` is pressed. | Stops when the `ReportActionsList` finishes laying out. | +| `switch_report` | ✅ | Time taken to open report.

**Platforms:** All | Starts when the chat in the LHN is pressed. | Stops when the `ReportActionsList` finishes laying out. | +| `open_report_from_preview` | ✅ | Time taken to open a report from preview.

(previously `switch_report_from_preview`)

**Platforms:** All | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | | `switch_report_from_preview` | ❌ | **[REMOVED]** Time taken to open a report from preview. | Starts when the user presses the Report Preview. | Stops when the `ReportActionsList` finishes laying out. | -| `chat_render` | ✅ | Time taken to render the Report screen. | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | -| `report_initial_render` | ❌ | Time taken to render the Report screen. | Starts when the first item is rendered in the `LHNOptionsList`. | Stops when the `ReportActionsList` finishes laying out. | -| `open_report_thread` | ✅ | Time taken to open a thread in a report. | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | -| `message_sent` | ❌ | Time taken to send a message. | Starts when the new message is sent. | Stops when the message is being rendered in the chat. | +| `chat_render` | ✅ | Time taken to render the Report screen.

**Platforms:** All | Starts when the `ReportScreen` is being rendered for the first time. | Stops once the `ReportScreen` component is mounted. | +| `report_initial_render` | ❌ | Time taken to render the Report screen.

**Platforms:** All | Starts when the first item is rendered in the `LHNOptionsList`. | Stops when the `ReportActionsList` finishes laying out. | +| `open_report_thread` | ✅ | Time taken to open a thread in a report.

**Platforms:** All | Starts when user presses Report Action Item. | Stops when the `ReportActionsList` finishes laying out. | +| `message_sent` | ❌ | Time taken to send a message.

**Platforms:** All | Starts when the new message is sent. | Stops when the message is being rendered in the chat. | ## Documentation Maintenance From e8299c9df9341500aa7b3a9eccf0cdaf511609a9 Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Fri, 27 Sep 2024 14:20:18 +0200 Subject: [PATCH 12/13] update homepage_initial_render desc --- contributingGuides/PERFORMANCE_METRICS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributingGuides/PERFORMANCE_METRICS.md b/contributingGuides/PERFORMANCE_METRICS.md index 1ae12d283854..b240b1c0080d 100644 --- a/contributingGuides/PERFORMANCE_METRICS.md +++ b/contributingGuides/PERFORMANCE_METRICS.md @@ -14,7 +14,7 @@ Project is using Firebase for tracking these metrics. However, not all of them a | `js_loaded` | ✅ | The time it takes for the JavaScript bundle to load.

**Platforms:** Android, iOS | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | | `_app_in_foreground` | ✅ | The time when the app is running in the foreground and available to the user.

**Platforms:** Android, iOS | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | | `_app_in_background` | ✅ | Time when the app is running in the background.

**Platforms:** Android, iOS | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | -| `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user.

**Platforms:** All | Starts at the beginning of the initial render of the app. | Stops at the end of the initial render process. | +| `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user.

**Platforms:** All | Starts at the beginning of the initial render of the app. | Stops once the `AuthScreens` component is mounted. | | `sidebar_loaded` | ❌ | Time taken for the Sidebar to load.

**Platforms:** All | Starts when the Sidebar is mounted. | Stops when the Splash Screen is hidden. | | `calc_most_recent_last_modified_action` | ✅ | Time taken to find the most recently modified report action or report.

**Platforms:** All | Starts when the app reconnects to the network | Ends when the app reconnects to the network and the most recent report action or report is found. | | `search_render` | ✅ | Time taken to render the Chat Finder page.

**Platforms:** All | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. | From e2a54789f79dde5a556db9cc5bc980be14a6eaad Mon Sep 17 00:00:00 2001 From: Tomasz Misiukiewicz Date: Fri, 27 Sep 2024 14:29:18 +0200 Subject: [PATCH 13/13] update desc for homepage_initial_render --- contributingGuides/PERFORMANCE_METRICS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributingGuides/PERFORMANCE_METRICS.md b/contributingGuides/PERFORMANCE_METRICS.md index b240b1c0080d..6c40e346a3ce 100644 --- a/contributingGuides/PERFORMANCE_METRICS.md +++ b/contributingGuides/PERFORMANCE_METRICS.md @@ -14,7 +14,7 @@ Project is using Firebase for tracking these metrics. However, not all of them a | `js_loaded` | ✅ | The time it takes for the JavaScript bundle to load.

**Platforms:** Android, iOS | **Android:** Starts in the `onCreate` method.

**iOS:** Starts in the AppDelegate's `didFinishLaunchingWithOptions` method. | Stops at the first render of the app via native module on the JS side. | | `_app_in_foreground` | ✅ | The time when the app is running in the foreground and available to the user.

**Platforms:** Android, iOS | **Android:** Starts when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Starts when the application receives the `UIApplicationDidBecomeActiveNotification` notification. | **Android:** Stops when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Stops when it receives the `UIApplicationWillResignActiveNotification` notification. | | `_app_in_background` | ✅ | Time when the app is running in the background.

**Platforms:** Android, iOS | **Android:** Starts when the last activity to leave the foreground has its `onStop()` method called.

**iOS:** Starts when the application receives the `UIApplicationWillResignActiveNotification` notification. | **Android:** Stops when the first activity to reach the foreground has its `onResume()` method called.

**iOS:** Stops when it receives the `UIApplicationDidBecomeActiveNotification` notification. | -| `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user.

**Platforms:** All | Starts at the beginning of the initial render of the app. | Stops once the `AuthScreens` component is mounted. | +| `homepage_initial_render` | ✅ | Time taken for the initial render of the app for a logged in user.

**Platforms:** All | Starts with the first render of the `AuthScreens` component. | Stops once the `AuthScreens` component is mounted. | | `sidebar_loaded` | ❌ | Time taken for the Sidebar to load.

**Platforms:** All | Starts when the Sidebar is mounted. | Stops when the Splash Screen is hidden. | | `calc_most_recent_last_modified_action` | ✅ | Time taken to find the most recently modified report action or report.

**Platforms:** All | Starts when the app reconnects to the network | Ends when the app reconnects to the network and the most recent report action or report is found. | | `search_render` | ✅ | Time taken to render the Chat Finder page.

**Platforms:** All | Starts when the Chat Finder icon in LHN is pressed. | Stops when the list of available options is rendered for the first time. |