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
CSC307 Lecture 09
javiergs
PRO
1
830
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
ThorVG Viewer In VS Code
nors
0
770
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
980
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
180
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
180
Patterns of Patterns
denyspoltorak
0
1.4k
CSC307 Lecture 02
javiergs
PRO
1
770
CSC307 Lecture 08
javiergs
PRO
0
670
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
450
Raft: Consensus for Rubyists
vanstee
141
7.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
300
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
From π to Pie charts
rasagy
0
120
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
62
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.9k
Odyssey Design
rkendrick25
PRO
1
490
Rails Girls Zürich Keynote
gr2m
96
14k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Building the Perfect Custom Keyboard
takai
2
680
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