func withBuildStep()

in Sources/XCMetricsBackendLib/Common/Models/Target.swift [89:105]


    func withBuildStep(buildStep: BuildStep) -> Target {
        self.id = buildStep.identifier
        self.buildIdentifier = buildStep.parentIdentifier
        self.name = buildStep.title.replacingOccurrences(of: "Build target ", with: "")
        self.startTimestamp = Date(timeIntervalSince1970: buildStep.startTimestamp)
        self.endTimestamp = Date(timeIntervalSince1970: buildStep.endTimestamp)
        self.startTimestampMicroseconds = buildStep.startTimestamp
        self.endTimestampMicroseconds = buildStep.endTimestamp
        self.duration = buildStep.duration.xcm_roundToDecimal(9)
        self.warningCount = Int32(buildStep.warningCount)
        self.errorCount = Int32(buildStep.errorCount)
        self.fetchedFromCache = buildStep.fetchedFromCache
        self.compilationEndTimestamp = Date(timeIntervalSince1970: buildStep.compilationEndTimestamp)
        self.compilationEndTimestampMicroseconds = buildStep.compilationEndTimestamp
        self.compilationDuration = buildStep.compilationDuration.xcm_roundToDecimal(9)
        return self
    }