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
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
The Mindset for Success: Future Career Progression
greggifford
PRO
0
370
Raft: Consensus for Rubyists
vanstee
141
7.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
How to make the Groovebox
asonas
2
2.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
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