Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out app starts with more than 60s #2127

Merged
merged 11 commits into from Jun 24, 2022
Merged

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!

marandaneto and others added 4 commits June 23, 2022 10:34
…artState.java

Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
…artState.java

Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
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 🚀

@@ -77,4 +77,16 @@ class AppStartStateTest {

assertEquals(400, sut.appStartInterval)
}

@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.

…artState.java

Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com>
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.

None yet

5 participants