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
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
220
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
490
Marketing to machines
jonoalderson
1
5.6k
Being A Developer After 40
akosma
91
590k
Thoughts on Productivity
jonyablonski
76
5.2k
Optimizing for Happiness
mojombo
378
71k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
350
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