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
Performance Testing using DTrace
Search
Renzo Crisóstomo
February 14, 2018
Programming
2
120
Performance Testing using DTrace
Slides from the presentation given at CocoaHeads Berlin February 2018 meet up.
Renzo Crisóstomo
February 14, 2018
Tweet
Share
More Decks by Renzo Crisóstomo
See All by Renzo Crisóstomo
Continuous Integration in a monorepo
ruenzuo
0
500
Secret History: xcconfig files
ruenzuo
0
65
!Introducing Swift in large code bases
ruenzuo
1
82
Scheduled Releases
ruenzuo
0
33
Other Decks in Programming
See All in Programming
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
「ブロックテーマでは再現できない」は本当か?
inc2734
0
850
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
SourceGeneratorのススメ
htkym
0
190
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
150
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
2026年 エンジニアリング自己学習法
yumechi
0
130
AI & Enginnering
codelynx
0
110
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
660
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
CSC307 Lecture 03
javiergs
PRO
1
490
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
For a Future-Friendly Web
brad_frost
182
10k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
How to build a perfect <img>
jonoalderson
1
4.9k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
300
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
A Tale of Four Properties
chriscoyier
162
24k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Transcript
PERFORMANCE TESTING USING DTRACE
MOTIVATION
NON-FUNCTIONAL SOFTWARE REQUIREMENTS
BACKSTORY: XING.APP
MEASURING PERFORMANCE WITH XCODE > CACurrentMediaTime / mach_absolute_time() > dispatch_benchmark
> -[XCTestCase measureBlock:]
INSTRUMENTS.APP
None
None
DTRACE
D LANGUAGE provider:module:function:name / predicate / { action statements }
ASOCCIATIVE ARRAYS instr$target:::benchmark_begin { time = timestamp; tag = copyinstr(arg0);
tag_times[tag] = time; } instr$target:::benchmark_end / tag_times[copyinstr(arg0)] != 0 / { tag = copyinstr(arg0); time = (timestamp - tag_times[tag]); printf("%s:%d\n", tag, time); }
PROVIDERS pid1337:libdl:dlopen:return objc7331:NSDate:-dateByAddingTimeInterval?:entry proc:::exec-success
VARS > execname -> process name > pid -> current
pid > timestamp -> nanoseconds > args[0]...[N] -> probe arguments > probemod -> probe module > probefunc -> probe function
None
None
INSTRUMENTS.APP IN THE CLI > instruments > iprofiler > UIAutomation
ORCHESTRATION 1. Prepare the software 2. Run the software 3.
Run DTrace 4. Build performance report
instr
ORCHESTRATION 1. Prepare the software 2. Run the software 3.
Run DTrace 4. Build performance report
gem install instrumentality bundle exec instr profile $INSTRUMENT $TARGET_PROCESS (--interactive)
DEMO
CLOSING > /usr/share/examples/DTTk > Lots of information out there! objc.io,
Oracle, Apple, Facebook > Software instrumentation using the iOS Simulator is far from ideal > Run DTrace on your own systems and get surprised by what's happening!
LINKS > objc.io: DTrace > instr > Jenkins demo: GitHub