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

Add compilation times to BuildStep and issues fixed #58

Merged
merged 7 commits into from
Feb 14, 2020

Conversation

ecamacho
Copy link
Collaborator

@ecamacho ecamacho commented Feb 13, 2020

With the new Xcode's Build System, we've observed that the linking phase could happen a significant amount of time after the compilation phase. Because of this, by looking into the duration field of a target may be misleading, if you check the steps inside the target you could find that the compilation took a few seconds and the linking happened hundred of seconds later.
This PR introduces two new fields: compilationDuration and compilationEndTimestamp that takes into account only the actual compilation time of a Target and an App.

Also in this PR I fixed the issues #51 and #53

private func addCompilationTimesToTarget(_ target: BuildStep) -> BuildStep {
let lastCompilationStep = target.subSteps
.filter { $0.isCompilationStep() }
.max { $0.compilationEndTimestamp < $1.compilationEndTimestamp }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice 👍

@mobileben
Copy link

@ecamacho thanks so much!

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.

3 participants