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
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
450
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
260
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.6k
Amusing Abliteration
ianozsvald
1
230
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Six Lessons from altMBA
skipperchong
29
4.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Visualization
eitanlees
152
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to make the Groovebox
asonas
2
2.3k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
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