Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mobile SDK overhead measurement #5

Open
3 of 9 tasks
bruno-garcia opened this issue May 9, 2022 · 2 comments
Open
3 of 9 tasks

Mobile SDK overhead measurement #5

bruno-garcia opened this issue May 9, 2022 · 2 comments

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented May 9, 2022

What we want to measure:

  • How the SDK affects Binary size
  • How the SDK affects the app startup time
  • Common SDK "features", like captureMessage,captureException, startTransaction, addBreadcrumb, performance profiling
  • How the SDK affects the app memory footprint?

What do we measure against:

  • The baseline is an app without sentry
  • We measure the overhead on the main branch and store it somewhere (gcloud)
  • We measure the overhead on a branch which has an open PR against the main branch

  • Work with the profiling team since they are working on this in the context of profiling
  • Bring the items from notion into GH
  • Define scope
  • measure screenshot overhead
  • Compare the result with main and post in the PR as a comment. See action

General approach

The goal is to run benchmarking on Sauce labs and check what’s the overhead (e.g. of the SDK during App start).
We can break the build if the overhead is more than a magic number or a specific percentage.
Profiling benchmark in Java does that - they break the test if the overhead is more than 5%. They also break the build if the overhead exceeds an absolute threshold.

Related:


Tracking issues, PRs and the current status

Java

The recently added (profiling-related) in-app benchmarks are based on Espresso (see getsentry/sentry-java#2013 & getsentry/sentry-java#2077. There has been a discussion about using Macrobenchmark in the PR that introduced the benchmarks, with the result being inconclusive and going ahead with the in-app benchmarks for now but evaluate Macrobenchmark.

Additionally, there's been an experiment with Jetpack Macrobenchmark in GDP to measure app startup - getsentry/sentry-android-gradle-plugin#317

@bruno-garcia bruno-garcia moved this to Needs Discussion in Mobile & Cross Platform SDK May 9, 2022
@bruno-garcia bruno-garcia moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Jul 6, 2022
@bruno-garcia bruno-garcia assigned vaind and unassigned marandaneto and vaind Jul 11, 2022
@bruno-garcia bruno-garcia moved this from Backlog to In Progress in Mobile & Cross Platform SDK Jul 13, 2022
@zoesyc zoesyc moved this to In Progress 📈 in Mobile Planning Jul 28, 2022
philipphofmann pushed a commit to getsentry/sentry-cocoa that referenced this issue Aug 31, 2022
See the overall issue at getsentry/team-mobile#5 and the sibling PR at sentry-java for the approach & some more details: getsentry/sentry-java#2171
@marandaneto
Copy link

@vaind would you mind updating this issue with the latest changes?
Some checkboxes are done already, and some issues can be closed I suspect.

@marandaneto
Copy link

The size analyses bit could be replaced by https://docs.emergetools.com/reference/get_analysis
Not telling that we should do this, just sharing that some tools are getting specialized in this field.

@kahest kahest moved this from Backlog to Needs Review in Mobile & Cross Platform SDK Dec 13, 2024
@kahest kahest moved this from Needs Review to In Progress in Mobile & Cross Platform SDK Dec 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Status: In Progress
Status: In Progress 📈
Development

No branches or pull requests

4 participants