feat: generate "DB on main thread" issues #39
Merged
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.

Provide a way to generate large amounts of DB entities, so that subsequent fetches take long enough to cause "DB on main thread" issues.
I was able to see DB on Main Thread issues now after generating large amounts of db records and relaunching the app to load them all at once: https://demo.sentry.io/issues/4542023700/?project=6249899&query=is%3Aunresolved+se%3Aandrewmcknight&referrer=issue-stream&statsPeriod=14d&stream_index=0
Here's a quick demo of how to generate the items:
db.mods.mov
There's also a launch argument you can use to immediately wipe the database if you find it's taking too long to launch the app and you want to start over (make sure not to commit the xcscheme file in git with this enabled):

closes #25