Skip to content

Commit 63317e5

Browse files
author
Robert Gummesson
authored
Merge pull request #41 from a-vlad/feature_per_file_build_time
Feature per file build time
2 parents f0b32a8 + e0d10ba commit 63317e5

3 files changed

Lines changed: 104 additions & 28 deletions

File tree

BuildTimeAnalyzer/CMCompileMeasure.swift

100644100755
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,22 @@ struct CMCompileMeasure {
5151
self.locationArray = locations
5252
self.references = references
5353
}
54-
54+
55+
init?(rawPath: String, time: Double) {
56+
let untrimmedFilename = rawPath.characters.split("/").map(String.init).last
57+
58+
guard let filepath = rawPath.characters.split(":").map(String.init).first else { return nil }
59+
guard let filename = untrimmedFilename?.characters.split(":").map(String.init).first else { return nil }
60+
61+
self.time = time
62+
self.code = ""
63+
self.path = filepath
64+
self.filename = filename
65+
self.locationArray = [1,1]
66+
self.references = 1
67+
}
68+
69+
5570
subscript(column: Int) -> String {
5671
get {
5772
switch column {

0 commit comments

Comments
 (0)