Skip to content

Conversation

@marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Jun 22, 2022

📜 Description

Filter out app starts with more than 60s

💡 Motivation and Context

getsentry/sentry-react-native#2295

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@bruno-garcia
Copy link
Member

Oh cocoa the cutoff was 5 min. Is one value more likely to be legit than the other?

@marandaneto
Copy link
Contributor Author

Oh cocoa the cutoff was 5 min. Is one value more likely to be legit than the other?

No, Also 60s getsentry/sentry-cocoa#1899

Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only some nits, LGTM!

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

}

@Test
fun `getAppStartInterval returns null if more than 60s`() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: We could add another test with the max app start duration of 59999 ms to validate it is working correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is unnecessary, we already test above and lower the boundary.
The comparison is a simple >= with a long value rather than some more complicated calculation.
I can do it but sounds like not needed, your call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone changes the MAX_APP_START_MILLIS to 10000000, no test will fail. Up to you.

@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2022

Codecov Report

Merging #2127 (6dd2eab) into main (b5ef9c5) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #2127   +/-   ##
=========================================
  Coverage     80.93%   80.93%           
  Complexity     3254     3254           
=========================================
  Files           231      231           
  Lines         11951    11951           
  Branches       1586     1586           
=========================================
  Hits           9673     9673           
  Misses         1698     1698           
  Partials        580      580           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5ef9c5...6dd2eab. Read the comment docs.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants