From 5157a9d46903d9fc8c112e5aa73a646c7a3c25a2 Mon Sep 17 00:00:00 2001 From: Aleksandr Gringauz Date: Mon, 7 Jul 2025 12:56:12 +0200 Subject: [PATCH 1/4] RUM-10726: Add more info about mobile sdk benchmarking --- config/_default/menus/main.en.yaml | 5 +++ .../android/_index.md | 1 + .../android/performance_overhead.md | 32 +++++++++++++++++++ .../session_replay/mobile/app_performance.md | 7 +++- 4 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml index 9863a34a7ebb1..7ab06b2b2ad98 100644 --- a/config/_default/menus/main.en.yaml +++ b/config/_default/menus/main.en.yaml @@ -7052,6 +7052,11 @@ menu: parent: rum_mobile_android identifier: rum_mobile_android_troubleshooting weight: 110 + - name: Performance overhead + url: real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead + parent: rum_mobile_android + identifier: rum_mobile_android_performance_overhead + weight: 111 - name: iOS and tvOS url: real_user_monitoring/mobile_and_tv_monitoring/ios parent: mobile_and_tv_monitoring diff --git a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md index 0b59ab710a07b..26486b1821fc4 100644 --- a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md +++ b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md @@ -34,4 +34,5 @@ To get started with RUM for Android, create an application and configure the And {{< nextlink href="/real_user_monitoring/mobile_and_tv_monitoring/android/troubleshooting">}} Troubleshooting: Common troubleshooting Android SDK issues.{{< /nextlink >}} {{< nextlink href="/real_user_monitoring/mobile_and_tv_monitoring/android/jetpack_compose_instrumentation">}}Jetpack Compose Instrumentation: Instrument Jetpack Compose manually or automatically using the Datadog Gradle Plugin. {{< /nextlink >}} +{{< nextlink href="/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead">}}Performance overhead: Learn about how SDK impacts performance of your application. {{< /nextlink >}} {{< /whatsnext >}} diff --git a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md new file mode 100644 index 0000000000000..5178c4608f39d --- /dev/null +++ b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md @@ -0,0 +1,32 @@ +--- +title: Performance overhead +description: Learn about how SDK impacts performance of your application. +aliases: +- /real_user_monitoring/mobile_and_tv_monitoring/performance_overhead/android +further_reading: +- link: https://github.com/DataDog/dd-sdk-android + tag: "Source Code" + text: dd-sdk-android Source code +- link: /real_user_monitoring + tag: Documentation + text: Explore Real User Monitoring +--- + +## Performance overhead measurements + +You can read the following pages with detailed explanation of how we measure performance overhead of the SDK: [Android][1], [iOS][2]. + +## Continuous benchmarks + +We also have an internal infrastructure of continuous benchmarking. There is an internal set of ui tests that run on a special benchmark application for every change made to the sdk. This way we are able to detect performance regression early and don't allow the corresponding changes to be included in the following release. + +You can find the source code of the benchmark app here: [Android][3], [iOS][4]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: https://github.com/DataDog/dd-sdk-android/blob/develop/docs/sdk_performance.md +[2]: https://github.com/DataDog/dd-sdk-ios/blob/develop/docs/session_replay_performance.md +[3]: https://github.com/DataDog/dd-sdk-android/tree/develop/sample/benchmark +[4]: https://github.com/DataDog/dd-sdk-ios/tree/develop/BenchmarkTests diff --git a/content/en/real_user_monitoring/session_replay/mobile/app_performance.md b/content/en/real_user_monitoring/session_replay/mobile/app_performance.md index 539acb6790207..b22d8d577eddb 100644 --- a/content/en/real_user_monitoring/session_replay/mobile/app_performance.md +++ b/content/en/real_user_monitoring/session_replay/mobile/app_performance.md @@ -36,8 +36,13 @@ To minimize the total upload volume, Datadog employs a highly optimized wire for ## Application size Datadog's SDK follows strict standards and aims to minimize the inclusion of third-party dependencies. This approach ensures that the SDK leverages as much native framework code as possible. On Android, the binary size produced by Datadog's own code in the AAR package is 480 kB. See more information on the application size impact [here][1]. On iOS, the size of exported `*.ipa` file will be higher by approximately 200 kB. +## Benchmarks +For more detailed description of how Session Replay performance overhead was measured you can visit the following pages: [Android][2], [iOS][3]. + ## Further reading {{< partial name="whats-next/whats-next.html" >}} -[1]: https://github.com/DataDog/dd-sdk-android/blob/develop/docs/sdk_performance.md?plain=1#L119 \ No newline at end of file +[1]: https://github.com/DataDog/dd-sdk-android/blob/develop/docs/sdk_performance.md?plain=1#L119 +[2]: https://github.com/DataDog/dd-sdk-android/blob/develop/docs/sdk_performance.md#session-relay-performance-measurement +[3]: https://github.com/DataDog/dd-sdk-ios/blob/develop/docs/session_replay_performance.md From 76de14b442dd260c88a5da8e8f7b2f68457cda86 Mon Sep 17 00:00:00 2001 From: Aleksandr Gringauz Date: Tue, 22 Jul 2025 13:21:16 +0200 Subject: [PATCH 2/4] RUM-10726: Pr fixes --- config/_default/menus/main.en.yaml | 4 +- .../android/_index.md | 2 +- .../android/performance_overhead.md | 32 --------- .../android/sdk_performance_impact.md | 66 +++++++++++++++++++ .../session_replay/mobile/app_performance.md | 2 +- 5 files changed, 70 insertions(+), 36 deletions(-) delete mode 100644 content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md create mode 100644 content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml index 7ab06b2b2ad98..c5f22ebbf3635 100644 --- a/config/_default/menus/main.en.yaml +++ b/config/_default/menus/main.en.yaml @@ -7052,8 +7052,8 @@ menu: parent: rum_mobile_android identifier: rum_mobile_android_troubleshooting weight: 110 - - name: Performance overhead - url: real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead + - name: SDK Performance Impact + url: real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact parent: rum_mobile_android identifier: rum_mobile_android_performance_overhead weight: 111 diff --git a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md index 26486b1821fc4..b5587c140f3a1 100644 --- a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md +++ b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/_index.md @@ -34,5 +34,5 @@ To get started with RUM for Android, create an application and configure the And {{< nextlink href="/real_user_monitoring/mobile_and_tv_monitoring/android/troubleshooting">}} Troubleshooting: Common troubleshooting Android SDK issues.{{< /nextlink >}} {{< nextlink href="/real_user_monitoring/mobile_and_tv_monitoring/android/jetpack_compose_instrumentation">}}Jetpack Compose Instrumentation: Instrument Jetpack Compose manually or automatically using the Datadog Gradle Plugin. {{< /nextlink >}} -{{< nextlink href="/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead">}}Performance overhead: Learn about how SDK impacts performance of your application. {{< /nextlink >}} +{{< nextlink href="/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact">}}SDK Performance Impact: Learn about how the SDK impacts performance of your application. {{< /nextlink >}} {{< /whatsnext >}} diff --git a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md deleted file mode 100644 index 5178c4608f39d..0000000000000 --- a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/performance_overhead.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: Performance overhead -description: Learn about how SDK impacts performance of your application. -aliases: -- /real_user_monitoring/mobile_and_tv_monitoring/performance_overhead/android -further_reading: -- link: https://github.com/DataDog/dd-sdk-android - tag: "Source Code" - text: dd-sdk-android Source code -- link: /real_user_monitoring - tag: Documentation - text: Explore Real User Monitoring ---- - -## Performance overhead measurements - -You can read the following pages with detailed explanation of how we measure performance overhead of the SDK: [Android][1], [iOS][2]. - -## Continuous benchmarks - -We also have an internal infrastructure of continuous benchmarking. There is an internal set of ui tests that run on a special benchmark application for every change made to the sdk. This way we are able to detect performance regression early and don't allow the corresponding changes to be included in the following release. - -You can find the source code of the benchmark app here: [Android][3], [iOS][4]. - -## Further Reading - -{{< partial name="whats-next/whats-next.html" >}} - -[1]: https://github.com/DataDog/dd-sdk-android/blob/develop/docs/sdk_performance.md -[2]: https://github.com/DataDog/dd-sdk-ios/blob/develop/docs/session_replay_performance.md -[3]: https://github.com/DataDog/dd-sdk-android/tree/develop/sample/benchmark -[4]: https://github.com/DataDog/dd-sdk-ios/tree/develop/BenchmarkTests diff --git a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md new file mode 100644 index 0000000000000..874cc1d035f0c --- /dev/null +++ b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md @@ -0,0 +1,66 @@ +--- +title: SDK Performance Impact +description: Learn about how the SDK impacts performance of your application. +further_reading: +- link: https://github.com/DataDog/dd-sdk-android + tag: "Source Code" + text: dd-sdk-android Source code +- link: /real_user_monitoring + tag: Documentation + text: Explore Real User Monitoring +--- + +## Overview + +When integrating any SDK into your Android application, understanding its performance impact is crucial for maintaining a smooth user experience. The Datadog RUM SDK is designed with performance in mind and provides transparent measurements to help you make informed decisions. + +## Performance impact benchmarks + +### Android SDK + +To simulate the typical usage of Datadog SDK it was integrated into the [Docile-Alligator/Infinity-For-Reddit][5] application and typical user behavior (scrolling the feed, browsing reddits) was simulated. + +Below are the results of the measurements. + +| Measurement | with SDK | w/o SDK | +|-------------------|--------------------------------|----------------| +| Peak CPU Usage | 26.8% | 25.2% | +| Peak Memory Usage | 432.6 MB | 437 MB | +| App startup time | 243 ms | 228.8 ms | +| Apk size | 11566506 bytes | 11044045 bytes | +| Network usage | 72.5 KB sent, 22.9 KB received | n/a | + +You can read the following [page][1] for more details about these benchmarks. + +### iOS SDK + +To simulate the typical usage of Datadog SDK it was integrated into the [Beam][6] application and typical user behavior (scrolling the feed, browsing reddits) was simulated. + +Below are the results of the measurements. + +| Measurement | with SDK | w/o SDK | +|-------------------|---------------------------------|----------| +| Peak CPU Usage | 44% | 40% | +| Peak Memory Usage | 72.4 MB | 67.96 MB | +| App startup time | 0.894 ms | 0.649 ms | +| Bundle size | 23.6 MB | 22.2 MB | +| Network usage | 21.88 KB sent, 1.68 KB received | n/a | + +You can read the following [page][2] for more details about these benchmarks. + +## Continuous benchmarks + +Datadog has an internal infrastructure of continuous benchmarking. There is an internal set of UI tests that run on a special benchmark application for every change made to the SDK. This way Datadog is able to detect performance regression early to ensure that they are prevented from reaching production releases. + +You can find the source code of the benchmark app here: [Android][3], [iOS][4]. + +## Further Reading + +{{< partial name="whats-next/whats-next.html" >}} + +[1]: https://github.com/DataDog/dd-sdk-android/blob/develop/docs/sdk_performance.md +[2]: https://github.com/DataDog/dd-sdk-ios/blob/develop/docs/sdk_performance.md +[3]: https://github.com/DataDog/dd-sdk-android/tree/develop/sample/benchmark +[4]: https://github.com/DataDog/dd-sdk-ios/tree/develop/BenchmarkTests +[5]: https://github.com/Docile-Alligator/Infinity-For-Reddit +[6]: https://github.com/awkward/beam diff --git a/content/en/real_user_monitoring/session_replay/mobile/app_performance.md b/content/en/real_user_monitoring/session_replay/mobile/app_performance.md index b22d8d577eddb..f4dc68f4d39c4 100644 --- a/content/en/real_user_monitoring/session_replay/mobile/app_performance.md +++ b/content/en/real_user_monitoring/session_replay/mobile/app_performance.md @@ -37,7 +37,7 @@ To minimize the total upload volume, Datadog employs a highly optimized wire for Datadog's SDK follows strict standards and aims to minimize the inclusion of third-party dependencies. This approach ensures that the SDK leverages as much native framework code as possible. On Android, the binary size produced by Datadog's own code in the AAR package is 480 kB. See more information on the application size impact [here][1]. On iOS, the size of exported `*.ipa` file will be higher by approximately 200 kB. ## Benchmarks -For more detailed description of how Session Replay performance overhead was measured you can visit the following pages: [Android][2], [iOS][3]. +For a more detailed description of how Session Replay performance impact was measured, see the following pages: [Android][2], [iOS][3]. ## Further reading From 36c531e0e73d2eea9810cd0d2337f466013cc24e Mon Sep 17 00:00:00 2001 From: Aleksandr Gringauz Date: Wed, 23 Jul 2025 10:32:43 +0200 Subject: [PATCH 3/4] RUM-10726: More pr fixes --- .../android/sdk_performance_impact.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md index 874cc1d035f0c..85c284ec684bc 100644 --- a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md +++ b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md @@ -18,11 +18,11 @@ When integrating any SDK into your Android application, understanding its perfor ### Android SDK -To simulate the typical usage of Datadog SDK it was integrated into the [Docile-Alligator/Infinity-For-Reddit][5] application and typical user behavior (scrolling the feed, browsing reddits) was simulated. +To simulate the typical usage of the Datadog SDK, it was integrated into the [Docile-Alligator/Infinity-For-Reddit][5] application and typical user behavior (in other words, scrolling the feed, browsing subreddits) was simulated. Below are the results of the measurements. -| Measurement | with SDK | w/o SDK | +| Measurement | with SDK | without SDK | |-------------------|--------------------------------|----------------| | Peak CPU Usage | 26.8% | 25.2% | | Peak Memory Usage | 432.6 MB | 437 MB | @@ -34,17 +34,17 @@ You can read the following [page][1] for more details about these benchmarks. ### iOS SDK -To simulate the typical usage of Datadog SDK it was integrated into the [Beam][6] application and typical user behavior (scrolling the feed, browsing reddits) was simulated. +To simulate the typical usage of Datadog SDK, it was integrated into the [Beam][6] application and typical user behavior (scrolling the feed, browsing reddits) was simulated. Below are the results of the measurements. -| Measurement | with SDK | w/o SDK | -|-------------------|---------------------------------|----------| -| Peak CPU Usage | 44% | 40% | -| Peak Memory Usage | 72.4 MB | 67.96 MB | -| App startup time | 0.894 ms | 0.649 ms | -| Bundle size | 23.6 MB | 22.2 MB | -| Network usage | 21.88 KB sent, 1.68 KB received | n/a | +| Measurement | with SDK | without SDK | +|-------------------|---------------------------------|-------------| +| Peak CPU Usage | 44% | 40% | +| Peak Memory Usage | 72.4 MB | 67.96 MB | +| App startup time | 0.894 ms | 0.649 ms | +| Bundle size | 23.6 MB | 22.2 MB | +| Network usage | 21.88 KB sent, 1.68 KB received | n/a | You can read the following [page][2] for more details about these benchmarks. From 46d06f80383372d48cd03899dd98a618c73a2ea5 Mon Sep 17 00:00:00 2001 From: Aleksandr Gringauz Date: Fri, 25 Jul 2025 09:58:44 +0200 Subject: [PATCH 4/4] RUM-10726: Added some info about sdk features used for benchmarking --- .../android/sdk_performance_impact.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md index 85c284ec684bc..41fccb70d359a 100644 --- a/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md +++ b/content/en/real_user_monitoring/mobile_and_tv_monitoring/android/sdk_performance_impact.md @@ -20,6 +20,16 @@ When integrating any SDK into your Android application, understanding its perfor To simulate the typical usage of the Datadog SDK, it was integrated into the [Docile-Alligator/Infinity-For-Reddit][5] application and typical user behavior (in other words, scrolling the feed, browsing subreddits) was simulated. +The following SDK modules were added to the application: + +* `dd-sdk-android-logs` +* `dd-sdk-android-trace` +* `dd-sdk-android-rum` +* `dd-sdk-android-okhttp` +* `dd-sdk-android-glide` + +The SDK was set up with default settings. + Below are the results of the measurements. | Measurement | with SDK | without SDK | @@ -36,6 +46,11 @@ You can read the following [page][1] for more details about these benchmarks. To simulate the typical usage of Datadog SDK, it was integrated into the [Beam][6] application and typical user behavior (scrolling the feed, browsing reddits) was simulated. +The SDK features that were used: +1. Basic RUM instrumentation for tracking views, actions, and resources +2. Logging +3. Tracing + Below are the results of the measurements. | Measurement | with SDK | without SDK |