Created
July 7, 2017 09:52
-
-
Save zyuanming/2ab5aa7ac09122fe009ab40e7bd97318 to your computer and use it in GitHub Desktop.
kdebug_signpost_start
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kdebug_signpost_start(10, 0, 0, 0, 0) | |
| // your test code | |
| kdebug_signpost_end(10, 0, 0, 0, 0) | |
| let urlSession = URLSession.shared | |
| let dlTask: URLSessionDownloadTask = urlSession.downloadTask(with: url) | |
| kdebug_signpost_start(20, (uintptr_t)dlTask, 0, 0, 0) | |
| // your test code | |
| kdebug_signpost_end(20, (uintptr_t)dlTask, 0, 0, 0) | |
| // Color by last argument | |
| // 0 - Blue, 1 - Green, 2 - Purple, 3 - Orange, 4 - Red | |
| // DispatchQueue.concurrentPerform equal to objc dispatch_apply method | |
| DispatchQueue.concurrentPerform(iterations: 10) { (index) in | |
| kdebug_signpost_start(30, index, 0, 0, 0) | |
| print("excute \(index)") | |
| kdebug_signpost_end(30, index, 0, 0, index % 2 == 0 ? 4 : 1) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment