getsentry / team-mobile

Meta issues for the Mobile team
4 stars 1 forks source link

Mobile SDK overhead measurement #5

Open bruno-garcia opened 2 years ago

bruno-garcia commented 2 years ago

What we want to measure:

What do we measure against:


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 https://github.com/getsentry/sentry-java/pull/2013 & https://github.com/getsentry/sentry-java/pull/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 - https://github.com/getsentry/sentry-android-gradle-plugin/pull/317

marandaneto commented 2 years ago

@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 commented 1 year ago

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.