 
 class CMLogProcessor: NSObject, CMLogProcessorProtocol {
     
-    var unprocessedResult: [CMRawMeasure] = []
+    var rawMeasures: [String: CMRawMeasure] = [:]
     var updateHandler: CMUpdateClosure?
     var workspace: CMXcodeWorkSpace?
     var shouldCancel = false

            let timeString = text.substringToIndex(text.startIndex.advancedBy(match.range.length - 4))
            if let time = Double(timeString) {
                let value = text.substringFromIndex(text.startIndex.advancedBy(match.range.length - 1))

                let cumulativeTime = rawMeasures[value] ?? 0
                rawMeasures[value] = cumulativeTime + time
            }
            if shouldCancel {
                break
            }
        }

        for (k, v) in rawMeasures {
            // Only show files whose compile time is above 10ms
            if v > 10 {
                unprocessedResult.append(CMRawMeasure(time: v, text: k))
            }
        }

        processingDidFinish()
    }
    
    private func updateResults(didComplete: Bool) {
        var results = processResult(unprocessedResult)
        results = groupResultsBySourceLine(results)
        results.sortInPlace{ $0.time > $1.time }

        updateHandler?(result: results, didComplete: didComplete)
        if didComplete {
            unprocessedResult.removeAll()
        }
    }

    private func processResult(unprocessedResult: [CMRawMeasure]) -> [CMCompileMeasure] {
        var result: [CMCompileMeasure] = []
        for entry in unprocessedResult {

    private func process(text text: String) {
        let characterSet = NSCharacterSet(charactersInString:"\r\"")
        var remainingRange = text.startIndex..<text.endIndex
        rawMeasures.removeAll()
        
        processingDidStart()
        
        while let nextRange = text.rangeOfCharacterFromSet(characterSet, options: [], range: remainingRange) {
            let text = text.substringWithRange(remainingRange.startIndex..<nextRange.endIndex)
            
            defer {
                remainingRange = nextRange.endIndex..<remainingRange.endIndex
