sentry-demos / android

16 stars 19 forks source link

Add delay between versions and slow db query #105

Closed stefanosiano closed 11 months ago

stefanosiano commented 11 months ago

Added a delay based on versions: even versions have a delay of 1 second, to show the difference between releases in the starfish screen Added a slow db query on start

Here is a transaction example (especially for the db span)

sdzhong commented 11 months ago

The slowQuery() may have caused the EmpowerPlantActivity transaction to be too slow.

I made a copy of the slow-db-query branch as https://github.com/sentry-demos/android/tree/slow-db-query-sz and ran the automation/pytest with the generated apk's and generated these EmpowerPlantActivity transactions. The transactions are approx 24s long (versus approx 9s in the main branch), which is edging towards too long.

May slowQuery() be less slow--perhaps keep the EmpowerPlantActivity transactions (via pytest) closer to 15s?

stefanosiano commented 11 months ago

@sdzhong i reduced the time. In case you need to adjust it, you can just change the loop count to whatever you prefer.

sdzhong commented 11 months ago

Looks great!

Validated the transaction duration change according to version image

image

Validated no regressions

  1. Flagship Error
  2. Flagship Error’s Transaction
  3. Flagship Transaction
  4. Performance Issues - DB on Main Thread, File IO on Main Thread, Regex on Main Thread, Image Decoding on Main Thread, JSON Decoding on Main Thread