Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
signpostsによるパフォーマンス計測
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shohei Yokoyama
June 20, 2018
450
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
signpostsによるパフォーマンス計測
Shohei Yokoyama
June 20, 2018
More Decks by Shohei Yokoyama
See All by Shohei Yokoyama
Image Processing with Vision Framework
shoheiyokoyama
2
2k
LLDB Debugging
shoheiyokoyama
2
1.9k
OSS development tips for iOS
shoheiyokoyama
0
270
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Speed Design
sergeychernyshev
33
1.9k
Side Projects
sachag
455
43k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
220
Facilitating Awesome Meetings
lara
57
7k
How to build a perfect <img>
jonoalderson
1
5.7k
GitHub's CSS Performance
jonrohan
1033
470k
Believing is Seeing
oripsolob
1
150
Transcript
signpostsʹΑΔύϑΥʔϚϯεܭଌ גࣜձࣾAbemaTV / shoheiyokoyama
ԣࢁฏ גࣜձࣾAbemaTV GitHub: shoheiyokoyama Twi$er: shoheiyokoyam
Measuring Performance Using Logging WWDC 2018 h"ps:/ /developer.apple.com/videos/play/wwdc2018/405/
Signposts • ύϑΥʔϚϯεΠϕϯτͷଌఆ͕Մೳ • OSLogΛ֦ுͨ͠API • InstrumentsͰ֬ೝՄೳ
Measuring Intervals import os.signpost let log = OSLog(subsystem: "com.example.app", category:
"SomeOperation") os_signpost(.begin, log: log, name: "doSomething") doSomething() os_signpost(.end, log: log, name: "doSomething")
Measuring Asynchronous Intervals import os.signpost let log = OSLog(subsystem: "com.example.app",
category: "SomeOperation") for element in elements { os_signpost(.begin, log: log, name: "doSomething") // Asynchronously doSomething(element) { // Measuring may fail ! os_signpost(.end, log: log, name: "doSomething") } }
Measuring Asynchronous Intervals import os.signpost let log = OSLog(subsystem: "com.example.app",
category: "SomeOperation") for element in elements { let signpostID = OSSignpostID(log: log) os_signpost(.begin, log: log, name: "doSomething", signpostID: signpostID) // Asynchronously doSomething(element) { os_signpost(.end, log: log, name: "doSomething", signpostID: signpostID) } }
Custom Metadata C-APIϥΠΫʹϝλใΛෳࢦఆՄೳ(CVarArg) os_signpost(.begin, log: log, name: name, signpostID: signpostID,
"%s, %d", description, number)
Demo h"ps:/ /github.com/shoheiyokoyama/DebuggingPerformance