Startup Profiling 1 - Decouple Profiler from Transaction#3101
Merged
stefanosiano merged 8 commits intomainfrom Jan 15, 2024
Merged
Startup Profiling 1 - Decouple Profiler from Transaction#3101stefanosiano merged 8 commits intomainfrom
stefanosiano merged 8 commits intomainfrom
Conversation
…ctionProfiler, allowing to bind one later some cleanup in the profiler
added options as param to AndroidTransactionProfiler.onTransactionFinish
Contributor
|
Contributor
Author
|
Possible breaking changes: |
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b172d4e | 412.60 ms | 492.68 ms | 80.08 ms |
| 4e29063 | 384.14 ms | 447.74 ms | 63.60 ms |
| 283d83e | 348.44 ms | 392.06 ms | 43.62 ms |
| 4e260b3 | 378.73 ms | 454.18 ms | 75.45 ms |
| c7e2fbc | 393.98 ms | 478.24 ms | 84.27 ms |
| d6d2b2e | 413.20 ms | 486.76 ms | 73.56 ms |
| 93a76ca | 378.48 ms | 451.78 ms | 73.30 ms |
| c3f503e | 360.41 ms | 434.67 ms | 74.27 ms |
| 1f3652d | 367.21 ms | 438.46 ms | 71.25 ms |
| baaf637 | 375.71 ms | 441.58 ms | 65.87 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b172d4e | 1.72 MiB | 2.29 MiB | 578.09 KiB |
| 4e29063 | 1.72 MiB | 2.29 MiB | 578.38 KiB |
| 283d83e | 1.72 MiB | 2.29 MiB | 577.69 KiB |
| 4e260b3 | 1.72 MiB | 2.27 MiB | 554.95 KiB |
| c7e2fbc | 1.72 MiB | 2.29 MiB | 576.40 KiB |
| d6d2b2e | 1.72 MiB | 2.27 MiB | 555.05 KiB |
| 93a76ca | 1.72 MiB | 2.29 MiB | 576.75 KiB |
| c3f503e | 1.72 MiB | 2.29 MiB | 577.04 KiB |
| 1f3652d | 1.72 MiB | 2.27 MiB | 554.95 KiB |
| baaf637 | 1.72 MiB | 2.27 MiB | 558.42 KiB |
Previous results on branch: feat/early-profiling1-decouple-profiler-transaction
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e42754c | 382.06 ms | 465.49 ms | 83.43 ms |
| 604628a | 389.84 ms | 456.78 ms | 66.94 ms |
| 1da0e4d | 375.46 ms | 448.53 ms | 73.07 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| e42754c | 1.72 MiB | 2.27 MiB | 557.10 KiB |
| 604628a | 1.72 MiB | 2.27 MiB | 558.57 KiB |
| 1da0e4d | 1.72 MiB | 2.27 MiB | 558.36 KiB |
…saction # Conflicts: # CHANGELOG.md
7 tasks
markushi
approved these changes
Dec 29, 2023
Member
markushi
left a comment
There was a problem hiding this comment.
Looking good! Nice clean cut 🥷 Just left a minor nit
sentry-android-core/src/main/java/io/sentry/android/core/AndroidTransactionProfiler.java
Show resolved
Hide resolved
romtsn
reviewed
Jan 11, 2024
romtsn
approved these changes
Jan 11, 2024
* added TransactionContext.isForNextStartup * added SentryOptions.enableStartupProfiling * added SentryStartupProfilingOptions class with Json ser/deser * added startupProfilingConfigFile deletion and creation on init * added sampling decision on SDK init with isForNextStartup flag set to true * added SentryOptions.getCacheDirPathWithoutDsn for startupProfiling config file * Startup Profiling 3 - Add ContentProvider and start profile (#3128) * first activity transaction now inherits startup sampling decision, if available * if a startup profiler was instantiated, it will be reused in AndroidOptionsInitializer, instead of creating a new one * added ITransactionProfiler.isRunning * startup profiler and sampling decision is stored in AppStartMetrics * startup profile is bound to the startup transaction * added io.sentry.profiling.enable-startup manifest option * moved profilingTracesHz from SentryAndroidOptions to SentryOptions * added startup profiling launch in SentryPerformanceProvider * added isStartupTransaction to TransactionOptions
…saction # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
removed the need of a transaction to start a profile in AndroidTransactionProfiler, allowing to bind one later
added a constructor to AndroidTransactionProfiler without options
added options as param to AndroidTransactionProfiler.onTransactionFinish
some cleanup in the profiler
💡 Motivation and Context
For the startup profiling feature, we need to create a profiler instance before the SDK is initialized, which means we don't have the options and cannot start any transaction, yet.
This change allows to create an instance of the profiler with only the parameters needed, without passing the whole SentryOptions object, and also allows to run the profiler before the transaction, and bind a transaction later on.
💚 How did you test it?
Unit tests
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps