Skip to content

feat(profiling): generate chrome compatible timeline data #5686

New issue

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

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

Already on GitHub? # to your account

Merged
merged 5 commits into from
Mar 25, 2023

Conversation

rigor789
Copy link
Member

@rigor789 rigor789 commented Jul 30, 2022

PR Checklist

What is the current behavior?

Profiling requires installing an external tool (timeline-view) and piping the output of a run command into it to generate a timeline html view.

What is the new behavior?

A timeline json file is generated automatically when timeline profiling is enabled (profiling: "timeline" in the nativescript config). The file is saved when the run is canceled with ctrl+c. The output json can be loaded into chrome devtools -> Performance and loading the json.


Commented out the SIGINT handling override - as it prevented listening for it for writing the timeline jsons - however this might cause side effects, so a different approach might be required.

For example and idle timeout, if no new traces come in within X seconds, it's automatically saved.

Another approach is listening for a keypress (for example s for "stop") and then stopping the timeline.

Other...?

Found a different approach by getting around the SIGINT prevention only when profiling.

@cla-bot cla-bot bot added the cla: yes label Jul 30, 2022
@rigor789 rigor789 added this to the 8.4 milestone Jul 30, 2022
@rigor789 rigor789 marked this pull request as ready for review March 25, 2023 15:18
@rigor789 rigor789 merged commit 0569873 into main Mar 25, 2023
@rigor789 rigor789 deleted the feat/chrome-timeline-profiling branch March 25, 2023 15:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant