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

How to Get Information about Compilation Time for Each Target/Module in the Workspace #221

Open
mollyIV opened this issue Nov 27, 2024 · 0 comments

Comments

@mollyIV
Copy link
Contributor

mollyIV commented Nov 27, 2024

We're trying to use the XCLogParser library to get information about compilation time for each target/module in our workspace.

Previously, we used the title and compilation duration properties like this:

let buildSteps = XcodeActivityLogAnalyzer().buildSteps(for: "App")

let names = buildSteps.map {
    // The title says "Build target XYZ" where XYZ is the name of the target, for instance:
    // Build target FrameworkA
    $0.title.split(separator: " ").last ?? $0.title
}
let compilationDurations = buildSteps.map { $0.compilationDuration }

let targets = Dictionary(
    zip(names, compilationDurations),
    uniquingKeysWith: { max($0, $1) }
)

However, this stopped working after we switched to Xcode 16 and integrated a Swift macro module. Now, all targets are showing a compilation duration of 0.

We can provide a POC if needed.

Using the solution from XCLogParser HtmlReporter doesn't work for us because it shows incorrect targets in the HTML report and uses duration instead of compilationDuration for charts.

Can you recommend a proper way to get accurate compilation times for each target/module in the workspace?

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

No branches or pull requests

1 participant