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

feat(profiling): Add optional js profile to Android profiles events #2706

Merged
merged 18 commits into from
Nov 29, 2023

Conversation

krystofwoldrich
Copy link
Member

This PR drafts a structure of mixed profiles which enable us to ingest for example Mixed React Native and Android profiles.

@krystofwoldrich krystofwoldrich marked this pull request as ready for review November 22, 2023 11:02
@krystofwoldrich krystofwoldrich requested a review from a team November 22, 2023 11:02
@krystofwoldrich
Copy link
Member Author

The PR is ready for review. Haven't tested it locally.

Copy link
Contributor

@olksdr olksdr left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Overall looks ok. I left few comments which I think should be addressed before we continue.

It would be also a good idea to add more unit tests to see if the things you expect end up in the correct places.

CHANGELOG.md Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
@krystofwoldrich
Copy link
Member Author

krystofwoldrich commented Nov 22, 2023

@olksdr

It would be also a good idea to add more unit tests to see if the things you expect end up in the correct places.

This code is not new, I just moved it to the Profile. There are tests for the functions in

, or would you like to see more here?

Copy link
Member

@Dav1dde Dav1dde left a comment

Choose a reason for hiding this comment

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

I am commenting on a lot of code that was moved (only saw that after), but maybe now is a good time to clean this up a bit.

relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
relay-profiling/src/android.rs Outdated Show resolved Hide resolved
@@ -221,6 +238,17 @@ mod tests {
);
}

#[test]
fn test_roundtrip_react_native() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This test validates the parsing doesn't fail, but we don't know if the contents are what we expect. What do you think about validating that too?

Copy link
Member Author

@krystofwoldrich krystofwoldrich Nov 23, 2023

Choose a reason for hiding this comment

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

Tests ensuring values are in current places are in sample.rs.

relay-profiling/src/sample.rs Show resolved Hide resolved
relay-profiling/src/sample.rs Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

The sample profile fixture seems a bit too excessive with 969KB, is this the minimal profile we can use?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's not the minimum, but it's an improvement compared to the previous roundtrip test (1,5 MB).

Copy link
Member

@Dav1dde Dav1dde left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up!

@krystofwoldrich
Copy link
Member Author

Thanks for the ✅ I'm waiting for one from the profiling team and then this can be merged.

@krystofwoldrich krystofwoldrich enabled auto-merge (squash) November 29, 2023 09:38
@krystofwoldrich krystofwoldrich merged commit 2f66866 into master Nov 29, 2023
20 checks passed
@krystofwoldrich krystofwoldrich deleted the kw-android-with-js-profile branch November 29, 2023 14:09
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

6 participants