sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Perf metrics

Open vaind opened this issue 3 years ago • 1 comments

:scroll: Description

See the overall issue at https://github.com/getsentry/team-mobile/issues/5 and the sibling PR at sentry-java for the approach & some more details: https://github.com/getsentry/sentry-java/pull/2171

:bulb: Motivation and Context

:green_heart: How did you test it?

:pencil: Checklist

  • [ ] I reviewed the submitted code
  • [ ] I added tests to verify the changes
  • [ ] I updated the docs if needed
  • [ ] Review from the native team if needed
  • [x] No breaking changes

:crystal_ball: Next steps

vaind avatar Aug 11 '22 18:08 vaind

Performance metrics :rocket:

Plain With Sentry Diff
Startup time (ms) 1264.06 1276.59 12.53
Size (bytes) 21161 328244 307083

github-actions[bot] avatar Aug 16 '22 10:08 github-actions[bot]

If I understand this correct, we do a cold start in the app and them measure how long it took to open. Is that right?

brustolin avatar Aug 16 '22 13:08 brustolin

If I understand this correct, we do a cold start in the app and them measure how long it took to open. Is that right?

Yes, that's right

vaind avatar Aug 16 '22 13:08 vaind

Do we have numbers already? How can I see the results?

Not sure about this approach. Initializing SentrySDK is a small part when it comes to opening an application. The standard deviation of opening an application alone can be longer than the SentrySDK.start time.

Is it possible to track only the SentrySDK.start part and compare it to previous versions?

brustolin avatar Aug 16 '22 13:08 brustolin

Do we have numbers already? How can I see the results?

  • https://github.com/getsentry/sentry-cocoa/pull/2067#issuecomment-1216453891
  • https://github.com/getsentry/sentry-cocoa/runs/7855978564?check_suite_focus=true#step:7:319

Not sure about this approach. Initializing SentrySDK is a small part when it comes to opening an application. The standard deviation of opening an application alone can be longer than the SentrySDK.start time.

Yes the stddev is actually longer than the diff between sentry and non-sentry app startup times in the current state (links above), yet it doesn't disqualify the result if it's a mean over a large-enough number of runs (50 currently). The goal is not to produce micro-benchmark level of precision, but to have some reference point and safeguard so that changes don't blow up the number excessively.

Is it possible to track only the SentrySDK.start part and compare it to previous versions?

Yes, it's possible to add this measurement too in the future, along with other major features, see https://github.com/getsentry/team-mobile/issues/5

vaind avatar Aug 16 '22 14:08 vaind